Dynamic Attributes and Properties - MateuszMazurkiewicz/coding-and-learning GitHub Wiki
- Interpreter calls
__getattr__and__setr__to evaluate atribute access using dot notation (e.g.obj.attr). A user-defined class implementing__getattr__can implement "virtual attributes" by computing values on the fly whenever somebody tries to read nonexistent attribute.