what exactly is "None" ?
Erik Max Francis
max at alcyone.com
Tue Mar 4 17:45:13 EST 2003
"Christopher A. Craig" wrote:
> In Python2.2 and earlier (i.e. all current production versions) None
> is mutable, so you could assign 6 to None and then anything equal to 6
> would return equal.
Well, you still _can_, in 2.3a2, you just get a SyntaxWarning:
Python 2.3a2 (#1, Feb 19 2003, 20:06:49)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> None = 1
<stdin>:1: SyntaxWarning: assignment to None
>>> None
1
(Mind you, I think the warning is sufficient, just being pedantic.)
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ The people are to be taken in very small doses.
\__/ Ralph Waldo Emerson
Alcyone Systems / http://www.alcyone.com/
Alcyone Systems, San Jose, California.
More information about the Python-list
mailing list