anything like C++ references?
belred1 at yahoo.com
Mon Jul 14 00:42:21 CEST 2003
> 3. Why is there no way to reference an immutable object via a
> pointer, other than stuffing it into a mutable object designed for
> some purpose other than simple pointer behaviour?
>>> a = (1, 2, 3)
>>> b = a
>>> print b
i just referenced an immutable object via a "pointer" and i __did_not__
stuff it into a mutable object as you say.
a and b "point" to the same object.
More information about the Python-list