Armin Rigo added the comment:

Wrong, sorry.  On a 32-bit Python 2.7, "(2**32-1)*n" has the same hash -2, for 
any value of n.

Of course if you build a dict containing thousands of such integers as keys, 
then right now you get unexpectedly bad performance.  I wonder if I should open 
another bug report about that --- the hash of longs should be slightly more 
random-looking...

----------

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

Reply via email to