Discussion about this post

User's avatar
emacs's avatar

"Thus, if two objects have the same hash value, then a dictionary will consider them as identical keys."

If they are equal (like 1==True, 1.0 == 1). If they are not equal and have the same hash that is just a **hash collision**, and all the objects are stored, see: https://stackoverflow.com/questions/9010222/why-can-a-python-dict-have-multiple-keys-with-the-same-hash

Expand full comment
Paul John's avatar

I got to start my day well with this :)

Thank you

Expand full comment
1 more comment...

No posts