Changes between Initial Version and Version 1 of Ticket #10962


Ignore:
Timestamp:
Mar 18, 2011, 4:27:36 PM (12 years ago)
Author:
Nicolas M. Thiéry
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10962

    • Property Cc Sage Combinat CC user added
    • Property Owner changed from Sage Combinat CC user to William Stein
    • Property Component changed from combinatorics to pickling
    • Property Summary changed from Problem with pickle in CombinatorialFreeModule to Set_PythonType objects are not picklable
  • Ticket #10962 – Description

    initial v1  
    1 This works:
    21
    32{{{
    4 sage: Q =  CombinatorialFreeModule( QQ, [1,2,3] )
    5 sage: a = Q.an_element()
    6 sage: dumps(a)
    7 ...
    8 }}}
    9 
    10 And this doesn't:
    11 
    12 {{{
    13 sage: Q =  CombinatorialFreeModule( QQ, sage.structure.parent.Set_PythonType(tuple) )
    14 sage: a = Q.an_element()
    15 sage: dumps(a)
    16 ---------------------------------------------------------------------------
    17 PicklingError                             Traceback (most recent call last)
    18 ...
    19 PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
     3    sage: S = sage.structure.parent.Set_PythonType(tuple)
     4    sage: dumps(S)
     5    ------------------------------------------------------------
     6    Traceback (most recent call last):
     7      File "<ipython console>", line 1, in <module>
     8      File "sage_object.pyx", line 842, in sage.structure.sage_object.dumps (sage/structure/sage_object.c:8274)
     9      File "sage_object.pyx", line 217, in sage.structure.sage_object.SageObject.dumps (sage/structure/sage_object.c:2183)
     10    PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
    2011}}}
    2112