New Features in Python 1.6

Martijn Faassen m.faassen at vet.uu.nl
Sun Apr 2 18:47:18 EDT 2000


Tom Culliton <culliton at clark.net> wrote:
>>4. assignment to None now works

> Huhn?  What exactly changed here?  You can assign to None in current
> versions just like you can to any other name.  I thought the push was
> to _prevent_ this.

Wild, I never knew that the current behavior allowed assigning to None.
Quite confusing if you do it:

>>> [None, None]
[None, None]

(okay..)

>>> None = 3
>>> [None, None]
[3, 3]
>>> None
3

Never caused any bugs for me, but I could imagine that could be confusing...

It's still in the 1.6a too.

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list