Boolean confusion

From: Frantisek Fuka (fuka_at_fuxoft.cz)
Date: 10/31/03


Date: Fri, 31 Oct 2003 19:37:25 +0100

Can anyone please explain why these two give different results in Python
2.3?

>>> 'a' in 'abc' == 1
False
>>> ('a' in 'abc') == 1
True

I know it's not a good idea to compare boolean with Integer but that's
not the answer to my question.

-- 
                                          Frantisek Fuka
(yes, that IS my real name)
(and it's pronounced "Fran-tjee-shek Foo-kah")
----------------------------------------------------
My E-mail:   fuka@fuxoft.cz
My Homepage: http://www.fuxoft.cz
My ICQ:      2745855

Quantcast