[docs] [issue11945] Adopt and document consistent semantics for handling NaN values in containers
Alexander Belopolsky
report at bugs.python.org
Thu Apr 28 08:21:27 CEST 2011
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
> I think it is presently a bug that a list containing
> a NaN value compares equal to itself.
Moreover, it also compares equal to another list containing the same NaN:
>>> [nan] is [nan]
False
>>> [nan] == [nan]
True
Here is another case of is implies == optimization breaking NaN property in stdlib:
>>> import ctypes
>>> x = ctypes.c_double(nan)
>>> x == x
True
----------
nosy: +belopolsky
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11945>
_______________________________________
More information about the docs
mailing list