This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Dubslow, docs@python, r.david.murray
Date 2017-11-23.16:12:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511453577.32.0.213398074469.issue32118@psf.upfronthosting.co.za>
In-reply-to
Content
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."
History
Date User Action Args
2017-11-23 16:12:57r.david.murraysetrecipients: + r.david.murray, docs@python, Dubslow
2017-11-23 16:12:57r.david.murraysetmessageid: <1511453577.32.0.213398074469.issue32118@psf.upfronthosting.co.za>
2017-11-23 16:12:57r.david.murraylinkissue32118 messages
2017-11-23 16:12:57r.david.murraycreate