[issue10356] decimal.py: hash of -1
Raymond Hettinger
report at bugs.python.org
Mon Nov 8 17:39:29 CET 2010
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
Good catch Stefan. This is a regression from Py2.6. The behavior for decimal should match that for int.
IDLE 2.6.2
>>> hash(-1)
-2
>>> (-1).__hash__()
-2
>>> from decimal import *
>>> hash(Decimal(-1))
-2
>>> Decimal(-1).__hash__()
-2
----------
nosy: +rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10356>
_______________________________________
More information about the Python-bugs-list
mailing list