my code is following in python.
class A(object):
b = B()
def d(self):
print "Hi"
class B():
def C(self):
self.__self__.d()#edit ::: i need to call d() method here. i know __self__ is wrong
# do knowledge for B being variable inside object A needed ? i.e
# passing parent object via init is needed as shown in some answer ?
# i search and found im_self __self__ etc...
temp = A()
temp.b.C()#should print hi ?
How do i do this ? i.e. access parent class object's method inside child's method ?
basically I want to send some signal to the parent class from one sibling object to call some method from another sibling object ( not shown in above code ) . I hope i do not sound too much confusing.