[docs] [issue11945] Adopt and document consistent semantics for handling NaN values in containers

Raymond Hettinger report at bugs.python.org
Thu Jul 11 09:52:21 CEST 2013


Raymond Hettinger added the comment:

I think this should be closed.  AFAICT it is of interest to a very tiny subset of the human species and as near as I can tell that subset doesn't include people in the numeric and statistics community (the ones who actually use NaNs as placeholders for missing values).

So much code (and human reasoning) assumes that identity-implies-equality, that is would be easier to document the exception to expectation than to try to find every place in every module where the assumption is present (implicitly or explicitly).  Instead, it would be better to document that distinct float('NaN') objects are never equal to one another and that identical float('NaN') objects may or may not compare equal in various implementation dependent circumstances.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11945>
_______________________________________


More information about the docs mailing list