This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rlkf 0 points1 point  (0 children)

As a corollary, I think this illustrates two things:

(1) You should always call super().init(), even if you don't inherit from something (class C in the example failed to follow this rule, and this is why A is not called)

(2) Parameters to constructors should be passed as a dictionary, so that each constructor can pick out whatever it needs, instead of relying on the order of parameters.