Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Private Attributes
pickletools.StackObject Class Reference

Object descriptors. More...

Inheritance diagram for pickletools.StackObject:
Inheritance graph
[legend]
Collaboration diagram for pickletools.StackObject:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__

Public Attributes

 name
 obtype
 doc
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Static Private Attributes

tuple __slots__

Detailed Description

Object descriptors.

The stack used by the pickle machine holds objects, and in the stack_before and stack_after attributes of OpcodeInfo descriptors we need names to describe the various types of objects that can appear on the stack.

Definition at line 694 of file pickletools.py.


Constructor & Destructor Documentation

def pickletools.StackObject.__init__ (   self,
  name,
  obtype,
  doc 
)

Definition at line 707 of file pickletools.py.

00707 
00708     def __init__(self, name, obtype, doc):
00709         assert isinstance(name, str)
00710         self.name = name
00711 
00712         assert isinstance(obtype, type) or isinstance(obtype, tuple)
00713         if isinstance(obtype, tuple):
00714             for contained in obtype:
00715                 assert isinstance(contained, type)
00716         self.obtype = obtype
00717 
00718         assert isinstance(doc, str)
00719         self.doc = doc

Here is the caller graph for this function:


Member Function Documentation

Definition at line 720 of file pickletools.py.

00720 
00721     def __repr__(self):
00722         return self.name
00723 


Member Data Documentation

tuple pickletools.StackObject.__slots__ [static, private]
Initial value:
(
        # name of descriptor record, for info only
        'name',

        # type of object, or tuple of type objects (meaning the object can
        # be of any type in the tuple)
        'obtype',

        # human-readable docs for this kind of stack object; a string
        'doc',
    )

Definition at line 695 of file pickletools.py.

Definition at line 718 of file pickletools.py.

Definition at line 709 of file pickletools.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 715 of file pickletools.py.


The documentation for this class was generated from the following file: