A dict with attribute (dot-notation) access enabled.
| 77 | |
| 78 | |
| 79 | class Namespace(dict): |
| 80 | """A dict with attribute (dot-notation) access enabled.""" |
| 81 | |
| 82 | def __getattr__(self, key): |
| 83 | if key not in self: |
| 84 | self[key] = Namespace() |
| 85 | return self[key] |
| 86 | |
| 87 | def __setattr__(self, key, value): |
| 88 | self[key] = value |
| 89 | |
| 90 | def __delattr__(self, key): |
| 91 | if key in self: |
| 92 | del self[key] |
| 93 | |
| 94 | |
| 95 | class Sections(enum.Enum): |
no outgoing calls
no test coverage detected