glyph at twistedmatrix.com
Mon Apr 24 21:50:53 CEST 2000
jepler.lnk at lnk.ispi.net (jepler epler) writes:
> On 21 Apr 2000 14:06:28 -0500, Glyph Lefkowitz
> <glyph at twistedmatrix.com> wrote:
> >Perhaps I should ask this question in a different way. How does
> >Pickle tell if an object is pickleable or not? Is there some
> >pickle.ispicklable method I could refer to?
> If you have control over the object hierarchy, why not use this
> 'unpicklable mixin' and convenience functions I just tossed together:
[ code snipped ]
Your suggestion didn't solve the problem (thanks for the code though,
useful nonetheless); however, I believe it may have elucidated to me
that what I want is fundamentally impossible. If I boil down my
request, it's for control over the object heirarchy without control
over the object heirarchy...
With the additions that I've stuck in, the only unpicklable things are
native code... I can achieve the control that I want by overriding the
interfaces that the pickle module describes, I think ...
It would still be nice if there were an option to register an error
handler to just ignore attributes which couldn't be pickled, rather
than failing. At this point though, I think I'd need to rewrite the
module to get that.
| ______ __ __ _____ _ _ |
| | ____ | \_/ |_____] |_____| |
| |_____| |_____ | | | | |
| @ t w i s t e d m a t r i x . c o m |
| http://www.twistedmatrix.com/~glyph/ |
More information about the Python-list