Problem with assigning variables of type List
Hans Nowak
wurmy at earthlink.net
Thu Aug 22 18:39:24 EDT 2002
Greg Ewing wrote:
>> Well, the word "variable" does have the connotation of "a little box
>> with a value in it, and assignment changes the value in that box"...
>> That is not how it works in Python,
>
> But it *is* how it works, as long as you understand
> that the only kind of value that a box can hold is
> a reference to an object.
OK. That's two ways of looking at the same thing. I prefer to think of things
as objects with names bound to them, rather than pointers to objects in boxes.
YMMV, of course.
--
Hans (base64.decodestring('d3VybXlAZWFydGhsaW5rLm5ldA=='))
# decode for email address ;-)
The Pythonic Quarter:: http://www.awaretek.com/nowak/
Kaa:: http://www.angelfire.com/jazz/aquila/blog/blogger.html
More information about the Python-list
mailing list