Mastering Python Class Inheritance: Multiple Base Classes and super()
Which of the following statements about class inheritance in Python are true? (Choose two.)
⚠ Common exam trap
Python Institute often tests the misconception that `super()` only calls a parent method, but in multiple inheritance it actually calls the next class in the MRO, which could be a sibling or a cousin, not necessarily a direct parent.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Abstract base classes can be defined using the ABC module.
Python's `abc` module (Abstract Base Classes) allows you to define abstract base classes by inheriting from `ABC` and using the `@abstractmethod` decorator. This enforces that subclasses must implement the abstract methods, providing a formal interface contract.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A class can inherit from only one base class.
Why it's wrong here
Python does not enforce single inheritance; a class declaration may list any number of base classes, e.g., class Derived(BaseA, BaseB): ... The runtime builds a method resolution order (MRO) that determines attribute lookup across all bases. Thus, saying a class can inherit from only one base class is false because multiple inheritance is a standard feature of the language.
- ✓
Abstract base classes can be defined using the ABC module.
Why this is correct
The abc module in Python's standard library supplies the ABC metaclass-derived helper class and the abstractmethod decorator for defining abstract base classes. Marking a method with @abstractmethod forces any concrete subclass to implement it before it can be instantiated; attempting to instantiate an unfinished subclass raises TypeError. This gives developers a robust mechanism for enforcing interface contracts in a dynamically typed language.
- ✗
A child class can override any method from its parent class, but only if the method is declared as virtual.
Why it's wrong here
Python has no 'virtual' keyword, and it does not need one: every instance method is dynamically dispatched and can be overridden by simply redefining the same name in a subclass. A child class may replace any method inherited from its parent, with no special declaration or modifier required. This open, 'duck-typed' behavior makes overriding the default rather than an explicitly enabled feature.
- ✗
The super() function is used to call a method from a sibling class.
Why it's wrong here
The super() built-in returns a proxy that forwards method calls to the next class in the instance's method resolution order (MRO), which in ordinary single inheritance is the immediate parent class. It is not intended for calling sibling classes' methods; sibling relationships are not addressable through super() as such. In cooperative multiple inheritance it can dispatch to another collaborator in the MRO, but that class is not a sibling—it is a later co-parent or ancestor.
- ✓
Python supports multiple inheritance.
Why this is correct
Python's class declaration syntax accepts multiple base classes, so a class can combine functionality from several parents at once, e.g., class MixinUser(MixinA, Base). The language resolves attributes and methods using the C3 linearization algorithm, which produces a deterministic MRO while honoring the order of bases and preserving monotonicity. This support for multiple inheritance is a core feature that distinguishes Python from languages that restrict classes to a single superclass.
Go deeper
Related to this question
About these practice questions
One of 421 original PCAP practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCAP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCAP exam.