From: Tim C. <tc...@op...> - 2001-04-17 21:05:18
|
Tavis Rudd wrote: > > Hi, > 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. Can I add my voice to Tavis' suggestion? The ability to cPickle MA arrays is absolutely essential. In the health sciences, where some data are **always** missing, MA is a godsend, but it needs to be able to be made a persistent godsend. Cheers, Tim C |