Like explained in the original post, my motivation for exploring implicit initialisation of inherited attributes was:
- Avoiding runtime errors (
AttributeError
) when a class calls inherited methods that use uninitialised attributes. - Making cooperative multiple inheritance automatic.
But I did not face any real problem. I just wanted to better understand the Python inheritance model (its strengths and weaknesses) by discussing this idea with other developers to see where it leads and at least learn a few things on the way. @steven.daprano did the intellectual exercise very well and @EpicWink even provided an implementation.