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 | |
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.
| 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.
| 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.