[Python-Dev] For review: PEP 285: Adding a bool type
David Abrahams
David Abrahams" <david.abrahams@rcn.com
Fri, 8 Mar 2002 15:31:35 -0500
----- Original Message -----
From: "David Ascher" <DavidA@ActiveState.com>
> I wonder if the str()/repr() distinction or % formatting codes could
> help break the logjam. Probably not.
>
> I'm still not convinced that the disease is worth the cure, but I'm
> open-minded =).
The big reason I was excited about bool in C++ when we got it was that I
knew I'd be able to do this, given b1,b2 of type bool:
if (b1 == b2) ...
And there would be no chance of getting the wrong result because b1 and
b2 were different ways to spell "true" (i.e. b1 == 1, b2 == 42). I guess
the python analogy would be:
if bool(x[y]) == bool(z):
...
or something like that.
FWIW,
Dave