[Python-Dev] Re: PEP 285: Adding a bool type

David Abrahams David Abrahams" <david.abrahams@rcn.com
Wed, 3 Apr 2002 16:49:43 -0500


From: "Guido van Rossum" <guido@python.org>
> False and True are numbers, and they are equal (==) to 0 and 1;
> everything else follows from there.

FWIW, that's the way it is in C++, and almost all of the same
conclusions fall out of it. Also, as distasteful as it may seem
intellectually, I have yet to hear any complaints about this situation
in practice... so it seems to work out OK. I also note that this is not
something people seem to have trouble with in making the transition from
C to C++, which is analogous to the problem of legacy 1/0 code.

-Dave