Andrew Barnert wrote:
Taking one step back out of the realm of mathematical definition, however, the original idea was simply to distinguish what I now understand to be "totally ordered" types from other types, be they "partially ordered" or unordered — not even having a full complement of rich comparison operators or having all but using them in weirder ways than sets do. Is there any commonly used or even imaginable useful type that uses them in weirder ways than set and float (which are both partially ordered) or np.array (where they aren’t even Boolean-values)? In particular, transitivity keeps coming up, but all of those examples are transitive (it’s never true that a<b and true that b<c without being
On Mar 4, 2020, at 00:07, Steve Jorgensen stevej@stevej.name wrote: true than a<c for any of them). If there are such uses it might be important to distinguish them, but if there aren’t, it doesn’t seem unreasonable for PartiallyOrdered to “wrongly” pick up hypothetical pathological types that no one will ever write in exchange for automatically being right about every actual type anyone uses. After all, Iterable is a virtual superclass of any type with __iter__, even if it returns the number 42 instead of an Iterator, and so on; technically every implicit ABC in Python is “wrong” like this, but in practice it doesn’t come up and implicit ABCs are very useful.
I see what you're saying. I guess what I was getting at is that for purposes of determining whether something is totally orderable or not, it doesn't matter what kind of not-totally-orderable the thing is — partially orderable (like sets), non-orderable (without full complement of operators), or some other weird thing that has the full compliment of operators.