#13811: LazyFamily cannot be copied if it can't be pickled
--------------------------------------------+--------------------------
       Reporter:  cnassau                   |        Owner:  was
           Type:  defect                    |       Status:  needs_work
       Priority:  minor                     |    Milestone:  sage-6.4
      Component:  pickling                  |   Resolution:
       Keywords:  LazyFamily, copy, pickle  |    Merged in:
        Authors:  Christian Nassau          |    Reviewers:
Report Upstream:  N/A                       |  Work issues:
         Branch:                            |       Commit:
   Dependencies:                            |     Stopgaps:
--------------------------------------------+--------------------------
Changes (by vdelecroix):

 * status:  needs_review => needs_work


Comment:

 Hi,

 As Nicolas suggested in [comment:6 his comnent 6], `__copy__` should be
 implemented as
 {{{
 def __copy__(self):
     return self
 }}}
 It is standard Python for immutable objects
 {{{
 sage: t = (1,2,3)
 sage: copy(t) is t
 True
 sage: i = 1231491283r
 sage: copy(i) is i
 True
 }}}

 Vincent

--
Ticket URL: <http://trac.sagemath.org/ticket/13811#comment:11>
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.

Reply via email to