PEP 285: Adding a bool type
David Abrahams
david.abrahams at rcn.com
Sun Mar 31 15:53:23 EST 2002
"Emile van Sebille" <emile at fenx.com> wrote in message
news:2NJp8.140405$Yv2.43077 at rwcrnsc54...
> Someone (Guido?) already mentioned that testing for true is redundant,
> but doesn't :
> if 2:
> imply
> if 2 == True:
> which in turn then implies that:
> True == 2
> is true?
Not exactly.
if x:
would be the same as
if bool(x):
(which is the same way it works in C++, FWIW).
-Dave
More information about the Python-list
mailing list