Mak Nazečić-Andrlon added the comment:
It's not about equality.
>>> class A: pass
...
>>> (float("nan"), A()) < (float("nan"), A())
False
That < comparison should throw a TypeError, since NaN < NaN is False, in the
same
Mak Nazečić-Andrlon added the comment:
The bug is that the comparison should throw a TypeError, but does not (for
incomparable A).
--
___
Python tracker
<http://bugs.python.org/issue21
New submission from Mak Nazečić-Andrlon:
While searching for a way to work around the breakage of the Schwartzian
transform in Python 3 (and the resulting awkwardness if you wish to use heapq
or bisect, which do not yet have a key argument), I thought of the good old
IEEE-754 NaN