Below is my code:
class Parent1(object):
def __init__(self):
print "!!! ___initialization Parent1___ !!!"
def method(self):
print "*** method of Parent1 is called ***"
class Parent2(object):
def __init__(self):
print "!!! ___initialization Parent2___ !!!"
def method(self):
print "*** method of Parent2 is called ***"
class Child(Parent1,Parent2):
def __init__(self):
print "!!! ___initialization Child___ !!!"
def method(self):
super(Child,self).method()
print "*** method of Child is called ***"
Ch = Child()
Ch.method()
I want to call method() of Parent2 class using object of child class. Conditions are only child class object should be created and no change in child class declaration (class Child(Parent1,Parent2): should not changed.)