operator.__cmp__

Erik Max Francis max at alcyone.com
Tue Dec 3 15:01:19 EST 2002


Antoon Pardon wrote:

> I have written a few modules in which something like the
> above would be usefull? So I wonder why are the comparisons
> not included in the operator module?

The operator module is for cousins of operators that are in the form of
functions.  Since cmp is already a function and is not an operator,
there's no need for its presence in the the operator module.

Under what circumstances would you have thought that an operator.cmp
would have been preferable to cmp itself?

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Together we can take this one day at a time
\__/ Sweetbox
    Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
 An Esperanto reference for English speakers.



More information about the Python-list mailing list