Message107954
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. |
|
Date |
User |
Action |
Args |
2010-06-16 20:49:34 | dalleyg | set | recipients:
+ dalleyg, jackdied, alexandre.vassalotti, bsilverthorn, craigcitro |
2010-06-16 20:49:34 | dalleyg | set | messageid: <1276721374.32.0.0178077009607.issue7689@psf.upfronthosting.co.za> |
2010-06-16 20:49:32 | dalleyg | link | issue7689 messages |
2010-06-16 20:49:31 | dalleyg | create | |
|