PEP 285: Adding a bool type

Roy Smith roy at panix.com
Sat Mar 30 08:14:34 EST 2002


What should the following examples print?

>>> print {} == False
>>> print {} is False

I'm convinced the second one should print "False", but I'm not really sure 
about the first.  I also assume that

>>> print False is not True

should print "True"?

For those thinking ahead to obfuscated Python contests, I can see having 
lots of fun with this.  The following, for example, is a valid Python 
program under this PEP:

False is not True is not "False is not True"



More information about the Python-list mailing list