summaryrefslogtreecommitdiffstats
path: root/Lib/_pydecimal.py
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2021-04-22 15:34:57 (GMT)
committerGitHub <noreply@github.com>2021-04-22 15:34:57 (GMT)
commita07da09ad5bd7d234ccd084a3a0933c290d1b592 (patch)
tree8c1ab67575527bd5c0c9452a74458ad5a29a1d08 /Lib/_pydecimal.py
parentaccea7dc2bd30a6e8e1b0334acfca9585cbd7f8a (diff)
downloadcpython-a07da09ad5bd7d234ccd084a3a0933c290d1b592.zip
cpython-a07da09ad5bd7d234ccd084a3a0933c290d1b592.tar.gz
cpython-a07da09ad5bd7d234ccd084a3a0933c290d1b592.tar.bz2
bpo-43475: Fix worst case collision behavior for NaN instances (GH-25493)
Diffstat (limited to 'Lib/_pydecimal.py')
-rw-r--r--Lib/_pydecimal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py
index ab989e5..ff23322 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