[issue10356] decimal.py: hash of -1
report at bugs.python.org
Fri Nov 19 11:46:58 CET 2010
Stefan Krah <stefan-usenet at bytereef.org> added the comment:
If I'm not mistaken, signaling NaNs are only created when the user
explicitly initializes a variable. I see this as direct request to
raise an exception whenever the variable is accessed in a way that
changes the outcome of the program:
This is the example I gave:
Now, ideally one would still be allowed to store signaling NaNs in
a dictionary and have them raise at the _exact_ location where they
are used in a mathematical operation or influence control flow.
But since that's not possible, I prefer things as they are.
+1 for adding a comment to the hash function.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list