Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

pickling extension classes

What is the write way to pickle a cython extension class? Consider the example

cdef class Stuff:
 def __init__(self):
      pass

then

a = Stuff()
a == loads(dumps(a))

gives the result False because the address of the new object generated by loads is different from the original object a.

pickling extension classes

What is the write right way to pickle a cython extension class? Consider the example

cdef class Stuff:
 def __init__(self):
      pass

then

a = Stuff()
a == loads(dumps(a))

gives the result False because the address of the new object generated by loads is different from the original object a.