Stefan Pochmann <stefan.pochm...@gmail.com> added the comment:

I misinterpreted you then, sorry. I guess also because Elliot shortly after 
retrated from the approach, saying he "rewrote unsafe_tuple_compare to move the 
less-than after the equality testing, to make sure it's 100% consistent".

I'd say the inconsistency the program showed was different. Yes, the xs got 
sorted differently than the ys, but the xs differed from the ys. The proposed 
method would change comparisons of *the same* tuples. You'd for example no 
longer have "sorted(tuples) == [min(tuples), max(tuples)]" for a list of two 
tuples.

Also curious factoid: I recently saw a case where despite the "only <" promise, 
sorting caused an "x > y" comparison (because "y < x" wasn't implemented).

(tiny note: tupsort.py does "range(2", should be "range(1" I think)

----------

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

Reply via email to