Python Class Sequential Inheritance
# An experiment on python super
class Base:
def __init__(self):
print("Start A")
print("End A")
class IA(Base):
def __init__(self):
print("Start IA")
super(IA, self).__init__()
print("End IA")
class IB(IA):
def __init__(self):
print("Start IB")
super(IB, self).__init__()
print("End IB")
print("Experiment 1:")
ib = IB()
Planted:
by L Ma;
Similar Articles:
til/programming/python/python-class-inheritance-sequential
Links to:LM (2020). 'Python Class Sequential Inheritance', Datumorphism, 12 April. Available at: https://datumorphism.leima.is/til/programming/python/python-class-inheritance-sequential/.