On 2015-03-04 14:47, Simon King wrote:
I don't agree with that description. If a Python class has both __cmp__ and _cmp_ (or both __add__ and _add_), then of course __cmp__ (resp. __add__) are called.
If a Python class has __add__ and _add_, then the *coercion framework* will use _add_, not __add__. When doing a + b, Python will call a.__add__(b) which the coercion framework will translate to an _add_ call on the coerced arguments. My proposal is to do the same for __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.