[Python-3000] Status of True, False, bool type
Josiah Carlson
jcarlson at uci.edu
Mon Jan 1 21:00:24 CET 2007
"Mike Orr" <sluggoster at gmail.com> wrote:
> Huh? 'True == 1' is a "feature"? '16 + (0 == 0)' being illegal is a
> "Javaism"? Would somebody care to explain this? It's acceptable that
> 2 is true but not True? Why do we need 1 for True at all if we have
> True?
>>> 1 is not True
True
>>> 1 == True
True
>>> isinstance(True, int)
True
If you are suggesting that we change this behavior, stop, it is not
going to happen. If you are asking why this is the case, I would imagine,
is based in C/C++/many other sane and insane languages' handling of
boolean true.
- Josiah
More information about the Python-3000
mailing list