Source code for tardis.utilities.staticmapping

from collections.abc import Mapping


[docs]class StaticMapping(Mapping): def __init__(self, **kwargs): self._data = dict(**kwargs) def __getitem__(self, item): return self._data[item] def __iter__(self): return iter(self._data) def __len__(self): return len(self._data) def __eq__(self, other): if not isinstance(other, StaticMapping): return False return self._data == other._data