Object-based inheritance in Python

Alexander Schmolck a.schmolck at gmx.net
Fri Jan 9 07:06:21 EST 2004


Tobias Windeln <Tobias.Windeln at gmx.de> writes:

> Maybe there is a way to hand over self to the delegatee object.
[...]

> class Child:
>      def __init__(self, delegatee):
>          self.__dict__['delegatee'] = delegatee

Can't you just use this pattern:

           self.__dict__['delegatee'] = delegatee(self)
  ?

'as



More information about the Python-list mailing list