"0 in [True,False]" returns True

Grant Edwards grante at visi.com
Tue Dec 13 10:20:27 EST 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
unpythonic.

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



More information about the Python-list mailing list