Method Delegation To Subinstances
digitalorganics at gmail.com
Tue May 23 20:24:44 CEST 2006
In the example:
def __init__(self, parent):
self.parent = parent
testme = "I love you!"
test = Boo(self)
A = Foo()
How can I set up method delegation so that I can do the following:
and have this call refer to the run() method within the boo instance? Also,
what if I have tons of functions like run() within the boo instance and I
want all them to be directly accessible as if they were part of their parent
(the Foo instance)?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list