On 2015-03-04 14:14, Simon King wrote:
"Priority" in the sense of "if you want to implement comparison for
elements, then implement "_cmp_" rather than "__cmp__"?
Yes. In other words: if a Python class has both __cmp__ and _cmp_, the
coercion framework should call _cmp_ (which will default to __cmp__).
This would make _cmp_ analogous to other operators like _add_. The only
difference is that __cmp__ doesn't inherit if __hash__ is defined, so
you might need to define both __cmp__ and _cmp_.
--
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.