#18758: Allow actions of a parent on itself
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.8
Component: coercion | Resolution:
Keywords: actions on itself | Merged in:
Authors: Simon King | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/SimonKing/allow_actions_of_parent_on_itself|
b57a6e35380933f429215a351fb2ade01c9d29c9
Dependencies: #18756 | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Simon King', 'oldvalue': ''}):
* status: new => needs_review
* commit: => b57a6e35380933f429215a351fb2ade01c9d29c9
* author: => Simon King
Comment:
I have changed the logic in the `bin_op()` method of the coercion model,
so that it is safer against infinite recursion. The error messages in most
cases do not just say that the operation "+" is unsupported, but say that
a common parent has not been found. Changing the expected error messages
is the hardest part of the latest commit.
Most important change: The coercion model now makes actual use of single
underscore methods!
You may be surprised by the implied statement that previously the coercion
model did ''not'' use them. In fact, it didn't. Up to now, the single
underscore methods have only been used as short-cuts in
`RingElement.__mul__` and friends. I have changed it, so that the short-
cut still works, but additionally the coercion model explicitly calls the
single underscore methods (when available) if both operands belong to the
same parent.
--
Ticket URL: <http://trac.sagemath.org/ticket/18758#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.