This would actually be useful for implementing my proposal of abstract attributes: [abc] Add abstract attributes via `abstract` type-hint
In essence, __post__
could be used by libraries to validate class instances, after they have been created. (abstract base classes and pydantic come to mind)
The issues with the solutions proposed so far in this thread is that they require the user to call super()___init__
last in their own __init__
. However, sometimes it is necessary to call super().__init__
early. The huge advantage of __post__
would be that it will be guaranteed that it is only called after __init__
and potential super().__init__
are resolved.