Python 2.4 removes None data type?

Steven Bethard steven.bethard at gmail.com
Mon Mar 7 11:55:42 EST 2005


Warren Postma wrote:
> Michael Hoffman wrote:
> 
>> The fact that True and False are not constants?
> 
> Yowza.
> 
> a = True
> b = False
> False = a
> True = b
> if (1==2)==True:
>     print "Doom"

Why stop there when you can really cause some doom:

py> import __builtin__ as bltin
py> bltin.True, bltin.False = bltin.False, bltin.True

As an example of what doom this causes, try typing it at the interactive 
prompt, and then see if you can enter anything else.  I can't -- the 
prompt just locks up.  Woo-hoo!  Another way to shoot myself (and my 
users) in the foot! =)

STeVe



More information about the Python-list mailing list