![](https://secure.gravatar.com/avatar/dd9ef248138ccdba939c8c9f483fc10d.jpg?s=120&d=mm&r=g)
April 3, 2002
7:34 p.m.
The issue of dictionary keys has been raised, and is a bit perplexing, but not overly so, IMO. However, I'd like confirmation that this is indeed the intended behavior:
d = {} d[0] = 'First' d {0: 'First'} d[False] = 'Second' d {0: 'Second'} d[0.0] = 'Third' d {0: 'Third'} d[()] = 'Fourth' d {0: 'Third', (): 'Fourth'} d[None] = 'Fifth' d {0: 'Third', (): 'Fourth', None: 'Fifth'}
Or are there any situations like this where you would want True and False to be a bit more like None and a bit less like ints? Meaning True and False could be dictionary keys separate from 0 and 1.
I see that you just addressed this and confirmed that True==1 and False==0 in all contexts. That's fine by me. I just wanted confirmation. --- Patrick K. O'Brien Orbtech