STINNER Victor added the comment: Many values have the same hash value, it's not an issue. The hash is only a best effort function to reduce hash collision, but hash collision is well handled in the dict type (as explained in other messages).
>>> hash(1) == hash(1.0) == hash(1.0+0j) == 1 True >>> hash('') == hash(b'') == hash(0) == hash(0.0) == hash(0.0j) == 0 True ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26614> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com