Python 2 vs. Python 3
Understand the improvements in class inheritance from Python 2 to Python 3 by examining the use of the super function and Method Resolution Order. Learn how Python 3 simplifies superclass initialization, making your code cleaner and more efficient.
We'll cover the following...
We'll cover the following...
Implementation in Python2
Let’s start by looking at a regular class definition. Then we’ll add
super using Python 2 to see how it changes.
This is a pretty standard set up for single inheritance. We have a base class and then the subclass. Another ...