Problem with assigning variables of type List
Abhishek Roy
abhishek at ocf.berkeley.edu
Tue Aug 20 23:22:56 EDT 2002
"Fredrik Lundh" <fredrik at pythonware.com> wrote in message news:<xiu89.5146$HY3.1421847 at newsc.telia.net>...
> ... you have to say something like "the object referred to
> by x is passed by reference". Or alternatively, "x is passed
> by value, and that value is a reference to an object". Just
> calling it "pass by reference" or "pass by value" are both
> half true and half false.
I'm still not quite sure what that means but after reading,
http://effbot.org/guides/python-objects.htm
I experienced a lovely feeling of enlightenment.
Just a nagging doubt, using the terminology in the above guide what's going
on with:
>>> a=[1,2,3]
>>> a[1]=a
>>> a
[1, [...], 3]
>>> a==a[1]
1
Abhishek
More information about the Python-list
mailing list