We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc73c3c commit 9f3f9e9Copy full SHA for 9f3f9e9
Python/pyhash.c
@@ -59,9 +59,9 @@ static Py_ssize_t hashstats[Py_HASH_STATS_MAX + 1] = {0};
59
_PyHASH_INF and -_PyHASH_INF are also used for the
60
hashes of float and Decimal infinities.
61
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.
+ NaNs hash with a pointer hash. Having distinct hash values prevents
+ catastrophic pileups from distinct NaN instances which used to always
+ have the same hash value but would compare unequal.
65
66
A selling point for the above strategy is that it makes it possible
67
to compute hashes of decimal and binary floating-point numbers
0 commit comments