I am unable to understand this code snippet.
class First():
def __init__(self):
super(First, self).__init__()
print("first")
class Second():
def __init__(self):
super(Second, self).__init__()
print("second")
class Third(Second, First):
def __init__(self):
super(Third, self).__init__()
print("third")
Third();
and the output is :
first
second
third
It seems that constructor of each is called in reverse order of base classes First.__init__()
then Second.__init__()
How is super(Third, self).__init__()
this statement working.