5 ms·
What you call a problem is simply how constructors work: users pass in the arguments that are expected for a certain way to initialize the object, and you eithe
by HelloNurse 4y ago
What you call a problem is simply how constructors work: users pass in the arguments that are expected for a certain way to initialize the object, and you either document these expected arguments with type hints or "lose type hinting".
Expecting to inherit type hints from an unrelated place, like the constructor of a superclass, is quite unjustified. The superclass is an implementation detail.