[Numpy-discussion] more on MA not pickling
tavis at calrudd.com
Tue Apr 17 14:17:00 CDT 2001
I posted something about this a few weeks ago, but got
distracted before I had a chance to look into it further
Revisions 1.5 and up of activeattr.py in the MA package
cause a fatal error when pickling is attempted. The pickle
and cPickle modules don't allow unbound instance methods to
be pickled and the ActiveAttributes mixin is storing
attribute handlers, such as ActiveAttribute.basic_get, as
unbound instance methods.
Revision 1.4 works fine if basic_get is modified so that
an AttributeError is raised instead of a KeyError when an
attribute is not found.
This bug was introduced in an attempt to allow child
classes of MA to be able to modify activeattributes. I
suggest reverting back to rev 1.4 of activeattr with a
modified basic_get method and forgetting about allowing
child classes to do this.
More information about the Numpy-discussion