summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2021-06-15 19:48:35 +0100
committerGitHub <noreply@github.com>2021-06-15 19:48:35 +0100
commit1d10bf0bb9409a406c56b0de8870df998637fd0f (patch)
treead498cd8d1a737cfdafe746d7b65a4e8e49ed52a
parentcb2014f2077c92c35486bf0db7e646a68478a7a5 (diff)
downloadcpython-git-1d10bf0bb9409a406c56b0de8870df998637fd0f.tar.gz
bpo-43475: Add what's new entry for NaN hash changes (GH-26725)
-rw-r--r--Doc/whatsnew/3.10.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 249eb733a8..9b9dd31a3b 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -836,6 +836,13 @@ Other Language Changes
effectless under ``from __future__ import annotations``.
(Contributed by Batuhan Taskaya in :issue:`42725`.)
+* Hashes of NaN values of both :class:`float` type and
+ :class:`decimal.Decimal` type now depend on object identity. Formerly, they
+ always hashed to ``0`` even though NaN values are not equal to one another.
+ This caused potentially quadratic runtime behavior due to excessive hash
+ collisions when creating dictionaries and sets containing multiple NaNs.
+ (Contributed by Raymond Hettinger in :issue:`43475`.)
+
New Modules
===========