#10460: Pickling of Functors
--------------------------+-------------------------------------------------
Reporter: SimonKing | Owner: nthiery
Type: defect | Status: new
Priority: major | Milestone: sage-4.6.1
Component: categories | Keywords: pickling, functors
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------+-------------------------------------------------
We used to have:
{{{
sage: F = QQ['t'].construction()[0]
sage: G = loads(dumps(F))
sage: G == F
True
sage: G.domain() == F.domain()
False
sage: G.codomain() is None
True
}}}
In other words, the cdef'd attributes of the construction functor are
lost.
I created a generic pickling method for functors, so that it works a lot
better:
{{{
sage: F = QQ['t'].construction()[0]
sage: G = loads(dumps(F))
sage: G == F
True
sage: G.domain() == F.domain()
True
sage: G.codomain() is None
False
}}}
The patch contains two tests, showing that the problem is solved.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10460>
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.