PS: On 11 Sep., 23:01, Simon King <simon.k...@uni-jena.de> wrote: > So, perhaps that is the solution!
No, it didn't work. It is the same error. as before. But is it perhaps required that in copy_reg.pickle(metacls, meth), metacls is the exact metaclass of the class to be pickled? In my case, I want to pickle the class MyPolyRing. The metaclass type(MyPolyRing) is a dynamic class formed from the metaclasses FastHashMetaclass (written by myself and not yet published) and sage.structure.dynamic_class.DynamicMetaclass. When I do copy_reg.pickle(FastHashMetaclass, FastHashMetaclass.__reduce__) then pickling does not work. But when I do copy_reg.pickle(type(MyPolyReg), FastHashMetaclass.__reduce__) then it works!! Hence, I guess the solution is to register the dynamic metaclass with copy_reg.pickle as soon as it is created. Best regards, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org