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
-- http://mail.python.org/mailman/listinfo/python-list