[Python-Dev] Boolean type for Py3K? (original) (raw)
M.-A. Lemburg mal@lemburg.com
Fri, 17 Mar 2000 23:41:46 +0100
- Previous message: [Python-Dev] Boolean type for Py3K?
- Next message: [Python-Dev] Should None be a keyword?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/
- Previous message: [Python-Dev] Boolean type for Py3K?
- Next message: [Python-Dev] Should None be a keyword?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]