Tim Peters added the comment:

I'm more puzzled by why `__hash__()` here bothers to call `hex()` at all.  It's 
faster to hash the underlying int as-is, and collisions in this specific 
context would still be rare.

@Josh, note that there's nothing bad about getting sequential hash codes in 
CPython's implementation of dicts.  This is explained in dictobject.c, in the 
long comment block starting with "Major subtleties ahead:".

In any case, I'm closing this, as nobody has brought up a real problem.

----------
nosy: +tim.peters
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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

Reply via email to