It ' s gotta be kids ? ND wins , MN loses even harder . <| sep |> How many crates ? <| sep |> Problem lei u tome ta ljudi misle da je MOST drukiji od ostalih # thistimeitsdifferent <| sep |> Hey author here This has nothing do with it . what ' s really happening is that True , 1 , and 1 . 0 all hash to the same value that is 1 because ints hash to themselves . Heh , that ' s what I thought initially , too and then we had an interesting discussion about this on my mailing list . Try this as a counter example class SameHash def hashself return 1 a SameHash b SameHash printa b False printhasha , hashb 1 , 1 printa ' a ', b ' b ' SameHash instance at 0 x 7 f 7159020 cb 0 ' a ', SameHash instance at 0 x 7 f 7159020 cf 8 ' b ' As this example shows , the keys get overwritten effect isn ' t caused by the hash value alone . And it turns out that this effect isn ' t causedby equality alone , either class AlwaysEquals def eqself , other Make this object equal to any other object . return True def hashself Give each object a unique hash code . return idselfAll instances of this class will pretend they ' re equal to any other object . However they will also each return a unique hash value . That ' ll allow us to test if dictionary keys are overwritten based on their equality comparison result alone . You ' ll see that the keys are not getting overwritten even though they always compare as equal AlwaysEquals ' yes ', AlwaysEquals ' no ' AlwaysEquals object at 0 x 110 a 3 c 588 ' yes ', AlwaysEquals object at 0 x 110 a 3 cf 98 ' no ' We can also confirm that each object has a unique hash value hashobj for obj in AlwaysEquals , AlwaysEquals , AlwaysEquals tel , tel , telSo maybe a better explanation of what ' s going on here is that dictionaries check for equality AND compare the hash value to determine if two keys are the same An object is hashable if it has a hash value which never changes during its lifetime it needs a hash method , and can be compared to other objects it needs an eq method . Hashable objects which compare equal must have the same hash value . Hashability makes an object usable as a dictionary key and a set member , because these data structures use the hash value internally . Source hashabletldr True ' yes ', 1 ' no ', 1 . 0 ' maybe ' evaluates to True ' maybe ' because True , 1 , and 1 . 0 all compare as equal and they all have the same hash value . True 1 1 . 0 True hashTrue , hash 1 , hash 1 . 0 1 , 1 , 1 I guess that means we ' re both right ? D