🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Inheritance, ABC and MRO: all 10 questions

Quiz: Inheritance, ABC and MRO · Question 7 of 10

Why should classes in a diamond call super().method() instead of A.method(self)?

Why should classes in a diamond call super().method() instead of A.method(self)?

  1. A.super() is faster
  2. B.A.method(self) is not valid Python
  3. C.With super() every class runs once; calling A directly can make A run twice
  4. D.super() skips the grandparent
Answer & explanation

Correct answer: With super() every class runs once; calling A directly can make A run twice

The super() chain follows the MRO, where A appears only once.

Can you get the rest right without peeking?

Take the timed Quiz: Inheritance, ABC and MRO quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →