Author belopolsky
Recipients belopolsky, docs@python, ncoghlan, v+python
Date 2011-04-28.06:21:27
SpamBayes Score 1.70486e-05
Marked as misclassified No
Message-id <1303971687.93.0.32783991787.issue11945@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
History
Date User Action Args
2011-04-28 06:21:27belopolskysetrecipients: + belopolsky, ncoghlan, v+python, docs@python
2011-04-28 06:21:27belopolskysetmessageid: <1303971687.93.0.32783991787.issue11945@psf.upfronthosting.co.za>
2011-04-28 06:21:27belopolskylinkissue11945 messages
2011-04-28 06:21:27belopolskycreate