Python 2.4 removes None data type?

Brian van den Broek bvande at po-box.mcgill.ca
Mon Mar 7 13:25:48 EST 2005


Steven Bethard said unto the world upon 2005-03-07 11:55:
> 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

Hi all,

just tried this in IDLE:

IDLE 1.1
 >>> import __builtin__ as bltin
 >>> bltin.True, bltin.False = bltin.False, bltin.True

 >>> ================================ RESTART 
================================

The restart was done by IDLE itself -- poor thing just gave up. So, it 
looks like Steve has found a `commit suicide' command for an IDLE 
shell :-)

Best to all,

Brian vdB




More information about the Python-list mailing list