Jeroen Demeyer <j.deme...@ugent.be> added the comment:

> So, jdemeyer, if it's possible to show (or describe) to us an example of a 
> problem you had, such that we could repeat it, that would be helpful (and 
> necessary) to evaluate any proposed changes.  What were the inputs to hash() 
> that caused a problem, and how did that problem manifest itself?

In all honesty, I don't remember. This was a while ago and at that time I 
didn't care enough to put up a CPython bug report. Still, this is a collision 
for tuples of short length (3) containing small integers (0 and -2). Why do you 
find that contrived?

What prompted me to report this bug now anyway is that I discovered bad hashing 
practices for other classes too. For example, meth_hash in 
Objects/methodobject.c simply XORs two hashes and XOR tends to suffer from 
catastrophic cancellation. So I was hoping to fix tuple hashing as an example 
for other hash functions to follow.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34751>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to