diff options
| author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2021-04-22 08:34:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-22 08:34:57 -0700 |
| commit | a07da09ad5bd7d234ccd084a3a0933c290d1b592 (patch) | |
| tree | 8c1ab67575527bd5c0c9452a74458ad5a29a1d08 /Lib/_pydecimal.py | |
| parent | accea7dc2bd30a6e8e1b0334acfca9585cbd7f8a (diff) | |
| download | cpython-git-a07da09ad5bd7d234ccd084a3a0933c290d1b592.tar.gz | |
bpo-43475: Fix worst case collision behavior for NaN instances (GH-25493)
Diffstat (limited to 'Lib/_pydecimal.py')
| -rw-r--r-- | Lib/_pydecimal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py index ab989e5206..ff23322ed5 100644 --- a/Lib/_pydecimal.py +++ b/Lib/_pydecimal.py @@ -951,7 +951,7 @@ class Decimal(object): if self.is_snan(): raise TypeError('Cannot hash a signaling NaN value.') elif self.is_nan(): - return _PyHASH_NAN + return super().__hash__() else: if self._sign: return -_PyHASH_INF |
