No, unfortunately for you, in Python all six types of comparisons are
tied together. When you decide that two objects are not equal, your
__cmp__ method will have to make an arbitrary decision about which one
to call "smaller". Tell your users that using < etc. is unwise on the
type you have defined. For certain operations it might still be
useful to try and define < consistently so that if a<b and b<c, a<c
is true. This is needed when e.g. a list of such objects gets
accidentally sorted.
Note that the same is true for all Python types -- in many cases the
comparison operator simply compares the address of two objects
(e.g. try comparing classes).
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>