StudyToCert

All certifications / PCAP / Lessons

PCAP – Certified Associate Python Programmer PCAP-31-03 · Domain 4: Object-Oriented Programming

Method resolution order (MRO), diamonds and inconsistent hierarchies

▶ Watch the overview video

Last reviewed September 25, 2026 · Leer en español

When you access an attribute on an object, Python searches a list of classes in a fixed order and uses the first match. That list is the method resolution order (MRO). For single inheritance it is simple: the class, its parent, the grandparent, up to object. With multiple inheritance, Python computes it with an algorithm called C3 linearization, and the exam expects you to predict the result for small hierarchies.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 6 more sections, 4 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study PCAP for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the PCAP study plan