This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dalleyg
Recipients alexandre.vassalotti, bsilverthorn, craigcitro, dalleyg, jackdied
Date 2010-06-16.20:49:31
SpamBayes Score 0.011833145
Marked as misclassified No
Message-id <1276721374.32.0.0178077009607.issue7689@psf.upfronthosting.co.za>
In-reply-to
Content
Another use case: for distributed processing, it's handy to be able to pickle interactive functions and functions that are part of a script.  The user can then remotely execute a broader set of functions than can be pickled by default.  This is especially helpful for interactive exploration of data.

Pickling most types of functions is possible by serializing a function's bytecode, etc. and registering a handler with copy_reg.  Unfortunately, this handler is ignored under some conditions (e.g. copy_reg is ignored when attempting to serialize top-level functions in a script) but the copy_reg handler does get used for lambdas and inner functions.  This patch looks like it will allow FunctionType's pickle handler to be overridden in all cases.
History
Date User Action Args
2010-06-16 20:49:34dalleygsetrecipients: + dalleyg, jackdied, alexandre.vassalotti, bsilverthorn, craigcitro
2010-06-16 20:49:34dalleygsetmessageid: <1276721374.32.0.0178077009607.issue7689@psf.upfronthosting.co.za>
2010-06-16 20:49:32dalleyglinkissue7689 messages
2010-06-16 20:49:31dalleygcreate