Message223287
'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 |
|
Date |
User |
Action |
Args |
2014-07-16 22:04:15 | ezio.melotti | set | recipients:
+ ezio.melotti, wolma |
2014-07-16 22:04:15 | ezio.melotti | set | messageid: <1405548255.88.0.300599204506.issue21993@psf.upfronthosting.co.za> |
2014-07-16 22:04:15 | ezio.melotti | link | issue21993 messages |
2014-07-16 22:04:15 | ezio.melotti | create | |
|