[issue10356] decimal.py: hash of -1

Mark Dickinson report at bugs.python.org
Mon Nov 8 16:42:26 CET 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Are there situations where this is a problem?

I don't think that there's any requirement that the __hash__ method for a user-defined Python type not return -1.  (It's also allowed to return values outside the range of hash values;  these get automatically rehashed to values within the range.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10356>
_______________________________________


More information about the Python-bugs-list mailing list