I have the following piece of code implementing multiple inheritance. I expect the call super(base2,self).__init__()
to print --> "Printing from base2".
But the program prints nothing; neither it throws error.
class base1:
def __init__(self):
print("printing from base1")
def method(self,val):
print("From method of base1", val)
class base2:
def __init__(self):
print("printing from base2")
def method(self,val):
print("From method of base2", val)
class child(base1, base2):
def __init__(self):
super(base2,self).__init__() #is not working as expected
x = child()