[Python-ideas] Break the dominance of boolean values in boolean context

Christopher King g.nius.ck at gmail.com
Tue Sep 13 00:32:15 CEST 2011


I do like the idea, but here is the problem
>>> s= StrangeObjectofDeath(True)
>>> if s: print "True"
True
>>> s and True
False
>>> True and s
True
>>> s or False
False
>>> False or s
True
>>> not s
"Bananas"
See how this could mess up a third party module if it is given this mess. It
also makes stuff less readable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110912/28e04d07/attachment.html>


More information about the Python-ideas mailing list