How much is set in stone?

Barry A. Warsaw barry at zope.com
Fri Nov 16 14:38:44 EST 2001


>>>>> "TP" == Tim Peters <tim.one at home.com> writes:

    TP> On the bright side of darkness <wink>, not all of cPickle got
    TP> documented.  We'll try to repair that for 2.2.  In particular,
    TP> you can set a find_global attribute on a cPickle Unpickler to
    TP> supply your own function for resolving names, and of special
    TP> interest is that if you set it to None, the Unpickler won't
    TP> import modules or unpickle class instances at all.  You could,
    TP> of course, also supply a function that accetps only a set of
    TP> blessed names (etc).

And pickle users can override the load_global() method on the
Unpickler to do something similar, although it's a bit more painful.
All documented in the freshly minted pickle docs for 2.2b2. :)

-Barry



More information about the Python-list mailing list