Message404393
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. |
|
Date |
User |
Action |
Args |
2021-10-20 04:07:03 | tim.peters | set | recipients:
+ tim.peters, rhettinger, Stefan Pochmann |
2021-10-20 04:07:03 | tim.peters | set | messageid: <1634702823.46.0.00936560017318.issue45530@roundup.psfhosted.org> |
2021-10-20 04:07:03 | tim.peters | link | issue45530 messages |
2021-10-20 04:07:03 | tim.peters | create | |
|