Python 3 only uses __eq__, __lt__, ..... Python also provides 
functools.partial_ordering to synthesizing the remaining methods just from 
__eq__ and __lt__. We either use that or write a similar decorator to also 
deal with coercion.

The __richcmp__ method is a Cython convention and doesn't exist in plain 
Python 3 (or 2 for that matter).

We clearly have to develop a plan for how to deal with this. In principle 
it is good to get rid of the confusion between cmp and rich comparison, but 
especially when there are symbolic (in)equalities involved then we 
exploited that extra freedom. 






On Sunday, October 26, 2014 8:52:55 PM UTC, Simon King wrote:
>
> Just for clarification: What exactly do you mean by "get away from 
> the __cmp__"? Are you saying we should use __richcmp__? Or are you 
> saying we should use __eq__, __le__, __lt__ etc directly? 
>
> I could be mistaken, but I think __eq__ and friends are old-fashioned, 
> and nowadays they are implemented by using __richcmp__. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to