Message161498
Thanks for the report. Yes, this is expected. Dictionary membership is based on equality of keys. Since True and 1 are equal, only one of them can be present in a dictionary at a time (and a key lookup works with either).
>>> x = {0: 'bar'}
>>> x[0]
'bar'
>>> x[False]
'bar'
>>> x[0.0]
'bar'
>>> 0 == False
True |
|
Date |
User |
Action |
Args |
2012-05-24 10:41:02 | mark.dickinson | set | recipients:
+ mark.dickinson, sbermeister |
2012-05-24 10:41:02 | mark.dickinson | set | messageid: <1337856062.63.0.825855425051.issue14898@psf.upfronthosting.co.za> |
2012-05-24 10:41:02 | mark.dickinson | link | issue14898 messages |
2012-05-24 10:41:01 | mark.dickinson | create | |
|