class A(object):
def __init__(self, id):
print("in A")
class B(object):
def __init__(self, id1, id2):
print("In B")
class C(A,B):
def __init__(self, id1, id2):
super(C, self).__init__(id1)
super(C,self).__init__(id1,id2)
I am calling C's object as C(1,2).
It throws error:
TypeError: __init__() takes exactly 2 arguments (3 given)
May I know how to call both parent class' __init__
from C's __init__
?