How to determine what called __cmp__ method?

Huaiyu Zhu hzhu at rocket.knowledgetrack.com
Mon Oct 23 15:41:17 EDT 2000


In comp.lang.python, you wrote:

>Now, with rich comparisons.. =)  (If anyone is interested in taking on the
>work of creating the rich comparisons patches, pushing the PEP through,
>etc., get in touch with me).
> 

David,

I'm interested in this, as I need it for numerical computation as well.  I
thought I sent you an email before, which might be lost somewhere.
Do you already have a draft of the PEP in any form?  Otherwise I can start
an initial draft listing the features I have in mind, which may motivate
others to add to it or even implement it.  

Right now the main feature I have in mind is to allow partial orders, so
that a!=b does not imply a<b or a>b.  I also want the comparison operators
to have their own names, like __lt__, __ge__, for example.

Huaiyu





More information about the Python-list mailing list