Description
It makes no sense to be unable to specify the interface for instantiating a class object. The only way around this at the moment is to specify a class method that serves the literal same purpose as the __init__
method, then relying upon it instead of the normal mechanism for object instantiation.
This is one of the poorest design decisions in CPython in my opinion. It breaks introspection tools that seek to document the required __init__
API, and it breaks even the concept of checking if the required __init__
API is followed. As I said, the only way around this is to create a new class method that merely replicates what the built-in __init__
method is supposed to do.
Line 1430 in b4e48a4
If there is some justification for this frustrating antipattern, please let me know. I do not see anything about this in PEP-544, though I only skimmed it looking for an answer and did not study it thoroughly.