Read-only attribute/dict view over a plain dict.
Unknown attributes return None (to play nicely with getattr(cfg, 'x', None)).
Source code in tigrbl/config/resolver.py
| def __init__(self, data: Mapping[str, Any]):
# freeze top-level mapping
self._data = MappingProxyType(dict(data))
|
get
Source code in tigrbl/config/resolver.py
| def get(self, key: str, default: Any = None) -> Any:
return self._data.get(key, default)
|
as_dict
Copy out a mutable dict (for diagnostics/serialization).
Source code in tigrbl/config/resolver.py
| def as_dict(self) -> Dict[str, Any]:
"""Copy out a mutable dict (for diagnostics/serialization)."""
return dict(self._data)
|