#17150: Proper syntax for creating morphism
-------------------------------+------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.4
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #10668 | Stopgaps:
-------------------------------+------------------------
Comment (by SimonKing):
A comment from #10668, what Nicolas would like to have:
----
For `A` a parent, `A.hom(on_basis = [data],...)` would call
`A.morphism_on_basis(data,...)`. This `morphism_on_basis` could
typically be implemented in `A`, or in `C.ParentMethods` for `C` the
category of `A`.
There are 5-6 explicit hom functions in Sage that would need to be
generalized to accept this syntax, while keeping backward
compatibility if no keyword is specified.
----
I am not totally sure whether I would like that change. The `A.hom(data,
B)` method should, in my opinion, be a short-cut for `A.Hom(B)(data)`, and
it should be the responsibility of the homset to process the data (by
means of `_element_constructor_`). I would like to have everything as
close to what we have for parents as possible. So, `_element_constructor_`
and friends should be used.
--
Ticket URL: <http://trac.sagemath.org/ticket/17150#comment:1>
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.