This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, wolma
Date 2014-07-16.22:04:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405548255.88.0.300599204506.issue21993@psf.upfronthosting.co.za>
In-reply-to
Content
'a' evaluates to true, but it's not equal to True:
  >>> bool('a')
  True
  >>> 'a' == True
  False
but 1 and True are equal (for historical reasons):
  >>> 1 == True
  True

Similarly '' evaluates to false, but it's not equal to False:
  >>> bool('')
  False
  >>> '' == False
  False
whereas 0 is equal to False:
  >>> 0 == False
  True
History
Date User Action Args
2014-07-16 22:04:15ezio.melottisetrecipients: + ezio.melotti, wolma
2014-07-16 22:04:15ezio.melottisetmessageid: <1405548255.88.0.300599204506.issue21993@psf.upfronthosting.co.za>
2014-07-16 22:04:15ezio.melottilinkissue21993 messages
2014-07-16 22:04:15ezio.melotticreate