On 2015-03-04 22:37, Travis Scrimshaw wrote:
Would it also be possible to check if (python) rich comparisons are
implemented and use those first before falling back to _cmp_, or having
the default try to call the rich comparisons?
Possible: maybe. But checking for Python-level stuff in Cython code is
very slow, so it's not a good idea.
I remember implementing
the rich comparisons but then I ran cmp(x, y) with the instances of this
class x,y and getting an error thrown back by Sage since Element
implemented __cmp__ which just called the unimplemented _cmp_ and raised
an error.
In such cases, the correct solution is probably to implement __cmp__ in
your class.
--
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.