Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Functions | Variables
copy_reg Namespace Reference

Functions

def pickle
 
def constructor
 
def pickle_complex
 
def _reconstructor
 
def _reduce_ex
 
def __newobj__
 
def _slotnames
 
def add_extension
 
def remove_extension
 
def clear_extension_cache
 

Variables

list __all__
 
dictionary dispatch_table = {}
 
int _HEAPTYPE = 1
 
dictionary _extension_registry = {}
 
dictionary _inverted_registry = {}
 
dictionary _extension_cache = {}
 

Detailed Description

Helper to provide extensibility for pickle/cPickle.

This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.

Function Documentation

def copy_reg.__newobj__ (   cls,
  args 
)
def copy_reg._reconstructor (   cls,
  base,
  state 
)
private
def copy_reg._reduce_ex (   self,
  proto 
)
private
def copy_reg._slotnames (   cls)
private
Return a list of slot names for a given class.

This needs to find slots defined by the class and its bases, so we
can't simply return the __slots__ attribute.  We must walk down
the Method Resolution Order and concatenate the __slots__ of each
class found there.  (This assumes classes don't modify their
__slots__ attribute to misrepresent their slots after the class is
defined.)
def copy_reg.add_extension (   module,
  name,
  code 
)
Register an extension code.
def copy_reg.clear_extension_cache ( )
def copy_reg.constructor (   object)
def copy_reg.pickle (   ob_type,
  pickle_function,
  constructor_ob = None 
)
def copy_reg.pickle_complex (   c)
def copy_reg.remove_extension (   module,
  name,
  code 
)
Unregister an extension code.  For testing only.

Variable Documentation

list copy_reg.__all__
Initial value:
1 = ["pickle", "constructor",
2  "add_extension", "remove_extension", "clear_extension_cache"]
dictionary copy_reg._extension_cache = {}
dictionary copy_reg._extension_registry = {}
int copy_reg._HEAPTYPE = 1
dictionary copy_reg._inverted_registry = {}
dictionary copy_reg.dispatch_table = {}

Copyright 2014 Google Inc. All rights reserved.