> Is there any commonly used or even imaginable useful type that uses
 > them in weirder ways than set and float

I don’t think this is relevant— Python is very dynamic,  operator overloading is a way to make your custom classes work
With the operators. There is no guarantee at all that any of the operators will “mean” the same thing for all objects. And the fact that classes in the standard library use them
In non standard ways (sets as is being discussed), and / for Path concatenation, and even + for lists (and aren’t we adding something for dicts as we speak?) not to mention numpy arrays...

So the presence of a given operator(s) does not mean anything about behavior. 

If we want a way to know if an arbitrary object is orderable, an ABC is the way to do that. 

This is in contrast to the presence of __iter__ for example. While you could define an __iter__ method that returns anything, the whole point is to make an object iterable, so there is no reason whatsoever to (an)use it in any other way.

Personally, The discussion about floats makes me have no interest in a well defined ABC, but then again, I have not gotten on the type checking bandwagon yet anyway :-)


Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython