Jul-17-2021, 07:37 PM
Is this possible? Or anything else can work in another way?
inherit A seems to be logically unnecessary and I don't know how to pass a func to self.b=B()
Thanks ahead!!!
class A(): def __init__(self): self.b=B() def func_in_A(self): #blablabla class B(): def run(self): self.higher_hierachy.func_in_A() #where 'self.higher_hierachy==self in A'The reason why I do this is I want the class of child thread (self.b) to use a function that is defined in the class of the main thread (A).
inherit A seems to be logically unnecessary and I don't know how to pass a func to self.b=B()
Thanks ahead!!!