[Python-Dev] Boolean type for Py3K?
M.-A. Lemburg
mal@lemburg.com
Fri, 17 Mar 2000 23:41:46 +0100
Guido van Rossum wrote:
>
> Yes. True and False make sense.
mx.Tools defines these as new builtins... and they correspond
to the C level singletons Py_True and Py_False.
# Truth constants
True = (1==1)
False = (1==0)
I'm not sure whether breaking the idiom of True == 1 and
False == 0 (or in other words: truth values are integers)
would be such a good idea. Nothing against adding name
bindings in __builtins__ though...
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/