R. David Murray <rdmur...@bitdance.com> added the comment:

The surprising thing is the behavior of NaN, which is *not equal* to itself.

The statement about orderability says "...are ordered the same as their first 
unequal elements".  This is explicit and unambiguous, there is no difference in 
this context between the number 1 and the singleton None, or the reflexivity 
enforced on NaN: all are equal to the corresponding element from the other 
sequence.  The whole point of the paragraph is that *no order test is done 
until the first unequal element is encountered*.

If we want to make this *more* explicit, I would suggest simply adding the 
following sentence after the first example in the original paragraph: "This 
means that reflexive elements that are otherwise unorderable (such as None and 
NaN) do not trigger a TypeError during a comparison."

----------
nosy: +r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32118>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to