diff options
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index c3dffa3..5a9f840 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -957,7 +957,8 @@ class Decimal(object): else: exp_hash = pow(_PyHASH_10INV, -self._exp, _PyHASH_MODULUS) hash_ = int(self._int) * exp_hash % _PyHASH_MODULUS - return hash_ if self >= 0 else -hash_ + ans = hash_ if self >= 0 else -hash_ + return -2 if ans == -1 else ans def as_tuple(self): """Represents the number as a triple tuple. |