The copy_reg module provides support for the pickleand cPicklemodules. The copymodule is likely to use this in the future as well. It provides configuration information about object constructors which are not classes. Such constructors may be factory functions or class instances.
object) |
type, function[, constructor]) |
The optional constructor parameter, if provided, is a callable object which can be used to reconstruct the object when called with the tuple of arguments returned by function at pickling time. TypeError will be raised if object is a class or constructor is not callable.
See the pickle module for more details on the interface expected of function and constructor.