On 22 Sep, 10:25, "Pekka Laukkanen" <[EMAIL PROTECTED]> wrote: > Hello, > > just noticed this: > > Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information.>>> {1: > 2} > {1: 2} > >>> {True: False} > {True: False} > >>> {1: 2, True: False} > > {1: False} > > This must be because > > >>> True == 1 and True in {1: 2} > > True
That's exactly the reason! > but it still doesn't feel exactly right. Would it be worth submitting a bug? I don't think it can be considered as a bug, for the reason you gave above and because dictionary keys are by definition unique with respect to equality. Perhaps you could call it a "surprising feature" :) -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list