[issue34751] Hash collisions for tuples
Jeroen Demeyer
report at bugs.python.org
Fri Sep 21 16:07:12 EDT 2018
Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:
> FWIW, the current algorithm also has some advantages that we don't want to lose. In particular, the combination of the int hash and tuple hash are good at producing distinct values for non-negative numbers:
>>> from itertools import product
>>> len(set(map(hash, product(range(100), repeat=4))))
100000000
FWIW: the same is true for my new hash function
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34751>
_______________________________________
More information about the Python-bugs-list
mailing list