Variable Modifications in a class

Steven Taschuk staschuk at
Tue Jun 3 19:53:53 CEST 2003

Quoth Alan Kennedy:
> "Mehta, Anish" wrote:
> >    c = b
>      ^^^^^
> This is where you are misunderstanding python.
> "b" and "c" are not variables, they are references. They are simply a name,
> which is "bound" to something, so the name "refers to" the something.

Nitpicking: 'b' and 'c' *are* variables.  It's just that what the
word 'variable' means in Python is different than what it means in
some other languages; in particular assignment is name-binding,
not value-copying, as you make clear.

Steven Taschuk             "The world will end if you get this wrong."
staschuk at     -- "Typesetting Mathematics -- User's Guide",
                                 Brian Kernighan and Lorrinda Cherry

More information about the Python-list mailing list