attr_dict.py 283 B

1234567891011121314
  1. # (c) Nelen & Schuurmans
  2. from typing import Any
  3. from typing import Dict
  4. __all__ = ["AttrDict"]
  5. class AttrDict(Dict[str, Any]):
  6. def __init__(self, *args, **kwargs):
  7. super().__init__(*args, **kwargs)
  8. self.__dict__ = self
  9. def dict(self):
  10. return self