On Tue, Mar 3, 2020 at 10:43 AM Steve Jorgensen <stevej@stevej.name> wrote:
Guido van Rossum wrote:
> I think it’s usually called Orderable. It’s a useful concept in static type
> checking too (e.g. mypy), where we’d use it as an upper bound for type
> variables, if we had it. I guess to exclude sets you’d have to introduce
> TotalOrderable.
>
Right. That's a much better term. `Orderable` and `ProtoOrderable`.

Or even PartialOrderable and Orderable. This would follow Rust's PartialOrd and Ord (https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html and https://doc.rust-lang.org/std/cmp/trait.Ord.html).

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.)

--
--Guido van Rossum (python.org/~guido)