Message134651
> 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 |
|
Date |
User |
Action |
Args |
2011-04-28 06:21:27 | belopolsky | set | recipients:
+ belopolsky, ncoghlan, v+python, docs@python |
2011-04-28 06:21:27 | belopolsky | set | messageid: <1303971687.93.0.32783991787.issue11945@psf.upfronthosting.co.za> |
2011-04-28 06:21:27 | belopolsky | link | issue11945 messages |
2011-04-28 06:21:27 | belopolsky | create | |
|