ptypy.core.classes.Base#

class ptypy.core.classes.Base(owner=None, ID=None, BeOwner=True)#

Bases: object

__init__(owner=None, ID=None, BeOwner=True)#

Ptypy Base class to support some kind of hierarchy, conversion to and from dictionaries as well as a ‘cross-node’ ID management of python objects

Parameters:
  • owner (Other subclass of Base or Base) – Owner gives IDs to other ptypy objects that refer to it as owner. Owner also keeps a reference to these objects in its internal _pool where objects are key-sorted according to their ID prefix

  • ID (None, str or int)

  • BeOwner (bool) – Set to False if this instance is not intended to own other ptypy objects.

Methods

__init__([owner, ID, BeOwner])

Ptypy Base class to support some kind of hierarchy, conversion to and from dictionaries as well as a 'cross-node' ID management of python objects

calc_mem_usage()

Attributes

ID

numID

owner