← Quiz: Inheritance, ABC and MRO: all 10 questions
Quiz: Inheritance, ABC and MRO · Question 6 of 10
Inside a method of class B, what does super() refer to when the object is a D (with MRO D, B, C, A)?
Inside a method of class B, what does super() refer to when the object is a D (with MRO D, B, C, A)?
- A.Always A, B's direct parent
- B.C, the next class after B in D's MRO
- C.D itself
- D.object
Answer & explanation
Correct answer: C, the next class after B in D's MRO
super() follows the MRO of the actual object, not the class where it is written.
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 →