New statement proposal for Python
Rainer Deyke
root at rainerdeyke.com
Fri Jun 15 19:20:17 EDT 2001
"David LeBlanc" <whisper at oz.nospamnet> wrote in message
news:9gdspv$324$0 at 216.39.170.247...
> you mistake a simple example for how something would of necessity be
> done. it could just as esasily be "alias true : not none and not 0"
So what would the semantics of 'a == true' be? There are two option, both
wrong (and I won't even mention the infinite number of other objects that
test as 'false').
>>> true = not None and not 0
>>> 5 is true
0
>>> 5 is not None and not 0
1
>>> 0 is not None and not 0
1
--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
More information about the Python-list
mailing list