SUAVE  2.5.2
An Aerospace Vehicle Environment for Designing Future Aircraft
SUAVE.Plugins.pint.compat.ChainMap Class Reference
Inheritance diagram for SUAVE.Plugins.pint.compat.ChainMap:
SUAVE.Plugins.pint.context.ContextChain

Public Member Functions

def __init__ (self, *maps)
 
def __missing__ (self, key)
 
def __getitem__ (self, key)
 
def get (self, key, default=None)
 
def __len__ (self)
 
def __iter__ (self)
 
def __contains__ (self, key)
 
def __bool__ (self)
 
def __repr__ (self)
 
def fromkeys (cls, iterable, *args)
 
def copy (self)
 
def new_child (self, m=None)
 
def parents (self)
 
def __setitem__ (self, key, value)
 
def __delitem__ (self, key)
 
def popitem (self)
 
def pop (self, key, *args)
 
def clear (self)
 

Public Attributes

 maps
 

Detailed Description

A ChainMap groups multiple dicts (or other mappings) together
to create a single, updateable view.

The underlying mappings are stored in a list.  That list is public and can
accessed or updated using the *maps* attribute.  There is no other state.

Lookups search the underlying mappings successively until a key is found.
In contrast, writes, updates, and deletions only operate on the first
mapping.

Constructor & Destructor Documentation

◆ __init__()

def SUAVE.Plugins.pint.compat.ChainMap.__init__ (   self,
maps 
)
Initialize a ChainMap by setting *maps* to the given mappings.
If no mappings are provided, a single empty dictionary is used.

Member Function Documentation

◆ new_child()

def SUAVE.Plugins.pint.compat.ChainMap.new_child (   self,
  m = None 
)
New ChainMap with a new map followed by all previous maps. If no
map is provided, an empty dict is used.

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