Python as first language (Re: static variables?)
Brian Quinlan
brian at sweetapp.com
Wed Nov 20 18:12:19 EST 2002
John Roth wrote:
> > I think that the conceptual problem that people have with
> > assignment being a binding operation is that they are used
> > to names labeling some sort of memory mailbox.
>
> If you take the word "memory" out of there, that does describe
> Python. I think this is a false distinction.
No it doesn't. In C or Java, when you write:
int a = 5;
you are, conceptually, saying: stick a 5 in the "a" mailbox.
In Python, when you write:
a = 5
you are, conceptually, saying: 5 is in a mailbox somewhere, make "a"
know the address of that mailbox. I wouldn't use the mailbox analogy
with Python though.
Cheers,
Brian
More information about the Python-list
mailing list