Automatic delegation in Python 3

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Wed Sep 8 18:02:07 EDT 2010


On Wed, 08 Sep 2010 15:45:46 -0400, Terry Reedy wrote:
[...]
>> Unfortunately, I need to use delegation, not inheritance, and I need to
>> use a new-style class, since I will be using Python 3. How can I do
>> automatic delegation in Python 3? Is my only hope to give up on the
>> elegance of automatic delegation, and code all the special methods as
>> manual delegation?
> 
> Based on the above, it seems so. But I would search a bit more for
> delegation and proxy object and python 3 to see what others have done.


That's what I was afraid of. Oh well.

Thanks to those who answered.



-- 
Steven



More information about the Python-list mailing list