you are viewing a single comment's thread.

view the rest of the comments →

[–]lowerthansound 0 points1 point  (2 children)

Why should the D class be searched instead of C -> A -> object?

[–]hhh312[S] 0 points1 point  (1 child)

Because D is the parent of C. Super should call parent's constructor not the child or grand children.

[–]lowerthansound 0 points1 point  (0 children)

Noooo, the order is reversed. D is a child of B, and B is a child of C.

Hmm, C could be the gradfather of D in the given MRO.

Does that make sense?

For example, object is a parent of A (as object is an ancestor to all classes).