On Thursday, January 29, 2015 at 10:52:32 AM UTC-8, Stefan wrote:
>
> No coercion is still faster than a fast coercion. 
>
The line "1/self" occurs INSIDE the __invert__ special method of 
> element.pyx.
>
> Should I open a ticket to replace that 1 by self.parent().one() ?
>

Yes, that seems like a no-brainer. You'll quickly see if "self" always has 
a parent that has a "one" ...
 

> Also, why isn't there an _invert_ method just like _add_ and friends?
>

There's no coercion involved with that one. I think the only reason to have 
_add_ is to ensure that __add__ is available to do generic coercion work 
(possibly even promoting up both arguments so that the _add_ called is on 
neither of the original arguments. For computing an inverse, there is never 
such work.

-- 
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