#12017: Adds CoerceKey
---------------------------+------------------------------------------------
Reporter: roed | Owner: robertwb
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.8
Component: coercion | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: David Roe
Merged: | Dependencies:
---------------------------+------------------------------------------------
Comment(by roed):
This patch is still in progress, but I'd like to get feedback on the
general approach and the changes to factory and parent. In particular,
I'm not very happy with the changes to comparison in parent, but I'm
trying to satisfy the following goals
* Check for type equality and coerce keys in Parent so that implementers
of new parents can just write one function that ignores coerce keys and
can assume that its inputs are the same type. Maybe one should be allowed
to be a subtype of the other instead?
* Not have to immediately change all of the `__cmp__` functions on parents
throughout Sage (see #10130 for what happens when you try to do this).
* Keep comparison equally fast or faster for parents that don't yet
facilitate coerce keys. In particular I'd like to avoid adding a bunch of
Python function calls.
I'd also like to incorporate some of the improvements from #10130 since I
need some of them.
Feedback is welcome.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12017#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.