[Tutor] re weird bool

prasad rao prasadaraon50 at gmail.com
Tue Feb 3 14:33:27 CET 2009


helloyes.you are right.
>>> 2==True
False

It is an unexpected result to me.
I thought any value other than 0 is True.
And the solution provided by you(bool(a/1))
is useful to me.

Thank you
Prasad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090203/968afa19/attachment.htm>


More information about the Tutor mailing list