Author ArnuldOnData
Recipients ArnuldOnData, docs@python
Date 2020-04-04.03:36:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In section "6.10.1 Value comparisons", it is written:

"The not-a-number values float('NaN') and decimal.Decimal('NaN') are
special. Any ordered comparison of a number to a not-a-number value is
false. A counter-intuitive implication is that not-a-number values are
not equal to themselves. For example, if x = float('NaN'), 3 < x, x <
3, x == x, x != x are all false. This behavior is compliant with IEEE

Last comparison "x != x" does not return False, it returns True. Here is the output from my iPython interpeter I am using on Arch Linux (latest as of today):

In [86]: x == y
Out[86]: False

In [87]: x != y
Out[87]: True

I verified the bug it on Wikipedia too:
Date User Action Args
2020-04-04 03:36:05ArnuldOnDatasetrecipients: + ArnuldOnData, docs@python
2020-04-04 03:36:05ArnuldOnDatasetmessageid: <>
2020-04-04 03:36:05ArnuldOnDatalinkissue40177 messages
2020-04-04 03:36:05ArnuldOnDatacreate