Hi Jeroen, On 2015-03-04, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote: > Anyway, continuing the above example: > sage: E += E > we got coercion > > The fact that __iadd__ calls _add_ would be analogous to __richcmp__ > calling _cmp_ instead of __cmp__. And that is what I want to do.
According to the documentation, one is allowed to treat __richcmp__ separate from __cmp__. Hence, it is legal to have separate behaviour for <,<= etc and for cmp(,). Is that possibility used in Sage somewhere? Do people think that it is good to *have* that possibility? If the answer to one of these questions is "yes", then one should perhaps rather support _richcmp_ and _cmp_, where the default __richcmp__ tries to call _richcmp_ after coercion and falls back to _cmp_ if it fails. Best regards, Simon -- 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.