#13811: LazyFamily cannot be copied if it can't be pickled
------------------------+---------------------------------------------------
Reporter: cnassau | Owner: was
Type: defect | Status: new
Priority: minor | Milestone: sage-5.5
Component: pickling | Keywords: LazyFamily, copy, pickle
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------+---------------------------------------------------
Currently, copying of `LazyFamily` objects only works for families that
can be pickled:
{{{
sage: def unpicklableFamily():
... x = 10
... return LazyFamily([1,2,3], lambda n: x*n)
sage: f = unpicklableFamily()
sage: copy(f)
Traceback (most recent call last):
...
ValueError: Cannot pickle code objects from closures
}}}
I suggest adding a `LazyFamily.__copy__` method that fixes this.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13811>
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.