I want to implement a function:
class FooBar():
def __init__(self):
self.foobar = foobar
def foo(self):
pass
def bar(self):
pass
a = Foobar()
after obtaining instance a, you can use the bar () method:
a.bar()
now, I want to let the foobar property and foo () method of an also use the bar () method:
a.foobar.bar()
a.foo().bar()
could you tell me how to write this? thank you