Would there be support for a more general cmp/__cmp__
apardon at forel.vub.ac.be
Thu Oct 20 09:14:51 CEST 2005
I was wondering how people would feel if the cmp function and
the __cmp__ method would be a bit more generalised.
The problem now is that the cmp protocol has no way to
indicate two objects are incomparable, they are not
equal but neither is one less or greater than the other.
So I thought that either cmp could return None in this
case or throw a specific exception. People writing a
__cmp__ method could do the same.
More information about the Python-list