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 tim.peters
Recipients Stefan Pochmann, rhettinger, tim.peters
Date 2021-10-20.04:07:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634702823.46.0.00936560017318.issue45530@roundup.psfhosted.org>
In-reply-to
Content
Stefan, I looked at that old PR and can't find anywhere I suggested that he change the unsafe_tuple_compare() logic. I just _asked_ him "I'm curious about what the patched Python prints for this program:".

And, in fact, that program showed that CPython was _already_ inconsistent with how NaNs were treated during tuple comparison (object identity overriding float.__eq__).

In any case, no, I have no problem at all with inferring "x == y" from "not (x < y) and not (y < x)".

Curious factoid: in [x, y].sort(), CPython never asks "x < y?". Because that's irrelevant ;-) The list is already sorted if and only if "not (y < x)". Which is how "x <= y" is spelled, because the implementation promises to do only "<" comparisons.
History
Date User Action Args
2021-10-20 04:07:03tim.peterssetrecipients: + tim.peters, rhettinger, Stefan Pochmann
2021-10-20 04:07:03tim.peterssetmessageid: <1634702823.46.0.00936560017318.issue45530@roundup.psfhosted.org>
2021-10-20 04:07:03tim.peterslinkissue45530 messages
2021-10-20 04:07:03tim.peterscreate