from copy import deepcopy
cdef class A(object):
cdef public double v
def __init__(self, double v):
self.v = v
cdef class B(object):
cdef public A a
def __init__(self, A a):
self.a = deepcopy(a)
No. In this case (you are using extension types, i.e cdef classes) you
have to implement the pickle protocol for your class
http://docs.python.org/library/pickle.html#pickling-and-unpickling-extension-types
--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169