[issue34751] Hash collisions for tuples
Jeroen Demeyer
report at bugs.python.org
Sat Sep 22 03:36:42 EDT 2018
Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:
> I don't know that primes are important here, but neither do I know that they're _not_ important here.
Hashes are effectively computed modulo 2**N. "Primes" are meaningless in that setting (except for the prime 2 which does have a meaning). For example, 1000003 is prime but 1000003 + 2**64 is not. But these represent the same number modulo 2**64. Also, multiplication by any odd number is a permutation modulo 2**N, so every odd number is invertible.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34751>
_______________________________________
More information about the Python-bugs-list
mailing list