Real Python
  • Start Here
  • Learn Python
    Start Learning
    Your Learning Plan →Your personalized Python learning plan Python Tutorials →In-depth articles and video courses Learning Paths →Guided study plans for accelerated learning
    Practice
    Quizzes & Exercises →Check your learning progress Browse Topics →Focus on a specific area or skill level Reference →Concise definitions for common Python terms
    Get Help
    Code Mentor →BetaPersonalized code assistance & learning tools Office Hours →Live Q&A calls with Python experts Community Chat →Learn with other Pythonistas
    Go Deeper
    Live Courses →Live, instructor-led Python courses Books →Round out your knowledge and learn offline Podcast →Hear what’s new in the world of Python
    Unlock All Content and Become a Python Expert →Get unlimited access to all Real Python has to offer
    Unlock All Content →Become a Python Expert
  • More
    Learner Stories Python Newsletter Python Job Board Meet the Team Become a Contributor
  • Search
/
  • Join
  • Sign‑In

Inheritance and Composition: A Python OOP Guide (Quiz)

Austin Cepalia
Inheritance and Composition: A Python OOP Guide Austin Cepalia 04:30
Recommended Tutorial Sample Code (.zip) Ask a Question
  • Contents
  • Discussion

Become a Member to take the quiz.

Become a Member to join the conversation.

Course Contents

Overview
96%
    Inheritance and Composition: A Python OOP Guide (Overview) 02:45
    What Are Inheritance and Composition? 02:17
    Inheritance 08:20
    Composition 04:41
    Inheritance in Python 07:13
    UML Diagrams 03:39
    Interfaces 11:13
    Implementing a Class Hierarchy 14:13
    Exercise: Build Employee Payroll Classes 11:00
    Abstract Classes 05:12
    Implementing the Productivity System 07:05
    Multiple Inheritance 11:15
    C3 Superclass Linearization (Optional) 07:55
    Avoiding the Diamond Problem 10:32
    Utilizing Composition 10:53
    Exercise: Compose an Employee With an Address 10:00
    Flexible Designs With Composition 15:43
    Modifying Object Behavior With Composition 01:56
    Inheritance Best Practices 07:25
    Mixin Classes 08:50
    Exercise: Implement a Dictionary Mixin 09:00
    Further Improving Design With Composition 15:37
    Composition to Change Runtime Behavior 05:20
    Exercise: Swap Payroll Policy at Runtime 13:00
    Deciding Between Composition and Inheritance 03:31
    Inheritance and Composition: A Python OOP Guide (Quiz) 04:30
    Inheritance and Composition: A Python OOP Guide (Summary) 01:15

© 2012–2026 Real Python ⋅ Privacy Policy