Skip to Content
Python: Essential Reference, Third Edition
book

Python: Essential Reference, Third Edition

by David Beazley
February 2006
Intermediate to advanced content levelIntermediate to advanced
648 pages
14h 53m
English
Sams
Content preview from Python: Essential Reference, Third Edition

copy_reg

The copy_reg module extends the capabilities of the pickle and cPickle modules to handle the serialization of objects described by extension types (as defined in C extension modules). To do this, extension writers use this module to register reduction and construction functions that are used to serialize and unserialize an object, respectively.

constructor(cfunc)

Declares cfunc to be a valid constructor function. cfunc must be a callable object that accepts the tuple of values returned by the reduction function given to the pickle() function.

pickle(type, rfunc [, cfunc])

Registers rfunc as a reduction function for objects of type type.rfunc is a function that takes an object of the specified type and returns a tuple containing the constructor ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python: Essential Reference

Python: Essential Reference

David M. Beazley

Publisher Resources

ISBN: 0672328623Purchase book