Now you know all about Python’s mechanisms for writing object-oriented code where the
data and operations on that data are structured together. You’re an old pro at using
the class
keyword to create these structures. You can also base the definition of
a class on other classes to create hierarchical structures and reuse your code.
This mechanism is known as inheritance.
In this course, you’ve learned about:
- Basic class inheritance
- Multi-level inheritance, or classes that inherit from classes
- Classes that inherit directly from more than one class, or multiple inheritance
- Special methods that you can use when writing classes
- Abstract base classes for classes that you don’t want to fully implement yet
To continue learning, you can watch the following video courses:
- Intro to Object-Oriented Programming (OOP) in Python
- Inheritance and Composition: A Python OOP Guide
- Supercharge Your Classes With Python super()
- Managing Attributes With Python’s property()
- Using Data Classes in Python
You can also check out the following written tutorials:
- Object-Oriented Programming (OOP) in Python 3
- Inheritance and Composition: A Python OOP Guide
- Supercharge Your Classes With Python super()
- Operator and Function Overloading in Custom Python Classes
- Python’s property(): Add Managed Attributes to Your Classes
- Data Classes in Python 3.7+ (Guide)
- Implementing an Interface in Python
This course is the second in a three-part series. Part one is an introduction to class syntax, teaching you how to write a class and use its attributes and methods. Part three dives deeper into the philosophy behind writing good object-oriented code.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
mikehillsnc on Sept. 13, 2023
Thanks. I have a better dunderstanding.