I have a class A and I have inherited a class B from class A. I have two methods methodX & methodY in ClassA. This methodY will be calling methodX in classA. Now I have a methodZ in ClassB.
The following is the scenario:-
class A(object):
def methodX(self):
....
def methodY(self):
methodX()
class B(A)
def methodZ(self):
self.methodY() #says the global methodX is not defined
My question is that I have to call methodY which inturn calls methodX from methodZ. How is it possible? Should I define the methodX globally ? Or is there any other alternative.. Thanks in advance !