Skip to content

Commit 9f3f9e9

Browse files
committed
Improve comment wording
1 parent dc73c3c commit 9f3f9e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/pyhash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ static Py_ssize_t hashstats[Py_HASH_STATS_MAX + 1] = {0};
5959
_PyHASH_INF and -_PyHASH_INF are also used for the
6060
hashes of float and Decimal infinities.
6161
62-
NaNs hash to their object id. Having distinct hash values prevents
63-
catastrophic piles-up for unique NaNs which used to always have
64-
the same hash value but would compare unequal.
62+
NaNs hash with a pointer hash. Having distinct hash values prevents
63+
catastrophic pileups from distinct NaN instances which used to always
64+
have the same hash value but would compare unequal.
6565
6666
A selling point for the above strategy is that it makes it possible
6767
to compute hashes of decimal and binary floating-point numbers

0 commit comments

Comments
 (0)