On Tue, Mar 3, 2020 at 5:35 PM Guido van Rossum email@example.com wrote:
But beware, IIRC there are pathological cases involving floats, (long) ints and rounding where transitivity may be violated in Python (though I believe only Tim Peters can produce an example :-). I'm honestly not sure that that's enough to sink the idea. (If it were, NaN would be a bigger problem.)
Floats cannot violate transitivity of inequality. But they are also not a total order when you include nans and infs (which are part of floats). I'm not as certain about unbounded ints, but I would be pretty surprised if they could somehow violate transitivity either.
Still, including floats in TotalOrderableExceptWeirdValues is fine... and that can alias Orderable for practical purposes.