Comparing objects - is there a maximum object?

Andrew Dalke adalke at
Thu Sep 4 23:09:17 CEST 2003

Martin v. Löwis:
> The easiest way to produce a maximum object is
> class Max:
>    def __cmp__(self, other):
>      return 1

Shouldn't there also be a

    def __rcmp__(self, other):
        return -1

                    dalke at

More information about the Python-list mailing list