Author: Manuel Jacob
Branch: py3k
Changeset: r61573:235bcc368b18
Date: 2013-02-22 01:22 +0100
http://bitbucket.org/pypy/pypy/changeset/235bcc368b18/
Log: Don't avoid returning -1 as hash value.
diff --git a/lib-python/3.2/decimal.py b/lib-python/3.2/decimal.py
--- a/lib-python/3.2/decimal.py
+++ b/lib-python/3.2/decimal.py
@@ -959,7 +959,7 @@
exp_hash = pow(_PyHASH_10INV, -self._exp, _PyHASH_MODULUS)
hash_ = int(self._int) * exp_hash % _PyHASH_MODULUS
ans = hash_ if self >= 0 else -hash_
- return -2 if ans == -1 else ans
+ return ans
def as_tuple(self):
"""Represents the number as a triple tuple.
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit