lisa.utils.FrozenDict#
- class lisa.utils.FrozenDict(x, deepcopy=True, type_=<class 'dict'>)[source]#
Bases:
MappingRead-only mapping that is therefore hashable.
- Parameters:
deepcopy (bool) – If
True, a deepcopy of the input will be done after applyingtype_.type (collections.abc.Callable) – Called on the input to provide a suitable mapping, so that the input can be any iterable.
Note
The content of the iterable passed to the constructor is deepcopied to ensure non-mutability.
Note
Hashability allows to use it as a key in other mappings.
Attributes
__reversed__inheritedSee
collections.abc.Mapping.__reversed__Methods
__class_getitem__()inheritedSee
collections.abc.Iterable.__class_getitem__()__contains__()inheritedSee
collections.abc.Mapping.__contains__()get()inheritedSee
collections.abc.Mapping.get()items()inheritedSee
collections.abc.Mapping.items()keys()inheritedSee
collections.abc.Mapping.keys()values()inheritedSee
collections.abc.Mapping.values()
Attributes#
- FrozenDict.__reversed__ = None#
Methods#
- classmethod FrozenDict.__class_getitem__()#
Inherited method, see
collections.abc.Iterable.__class_getitem__()
- FrozenDict.__contains__(key)#
Inherited method, see
collections.abc.Mapping.__contains__()
- FrozenDict.get(k[, d]) D[k] if k in D, else d. d defaults to None.#
Inherited method, see
collections.abc.Mapping.get()
- FrozenDict.items() a set-like object providing a view on D's items#
Inherited method, see
collections.abc.Mapping.items()
- FrozenDict.keys() a set-like object providing a view on D's keys#
Inherited method, see
collections.abc.Mapping.keys()
- FrozenDict.values() an object providing a view on D's values#
Inherited method, see
collections.abc.Mapping.values()