1. Pypy
  2. Untitled project
  3. pypy

Commits

Manuel Jacob  committed 235bcc3

Don't avoid returning -1 as hash value.

  • Participants
  • Parent commits 01ed12f
  • Branches py3k

Comments (0)

Files changed (1)

File lib-python/3.2/decimal.py

View file
  • Ignore whitespace
             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.