mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-43475: Add what's new entry for NaN hash changes (GH-26725)
This commit is contained in:
parent
cb2014f207
commit
1d10bf0bb9
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
===========
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue