"0 in [True,False]" returns True

Grant Edwards grante at visi.com
Tue Dec 13 16:20:27 CET 2005

On 2005-12-13, Paul Rubin <> wrote:
> Steve Holden <steve at holdenweb.com> writes:

>> The really interesting question your post raises, though, is
>> "Why do you feel it's necessary to test to see whether a
>> variable is a Boolean?".
> What's the point of having Booleans, if you can't tell them
> from integers?

You _can_ tell them from integers.  The point is that thinking
you need to in "normal" code is usually wrong.  Or at least

Grant Edwards                   grante             Yow!  It's NO USE... I've
                                  at               gone to "CLUB MED"!!

More information about the Python-list mailing list