Message 150727 - Python tracker (original) (raw)
Stupid email interface again... here's the full text:
The hash-attack.patch solves the problem for the integer case I posted earlier on and doesn't cause any problems with the test suite.
d = dict((x*(264 - 1), hash(x(264 - 1))) for x in xrange(1, 100)) d = dict((x(264 - 1), hash(x(2*64 - 1))) for x in xrange(1, 1000)) Traceback (most recent call last): File "", line 1, in KeyError: 'too many hash collisions'
It also doesn't change the hashing or dict repr in existing applications.