Re: decorating a method in multiple child classes

2008-07-17 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > I wish to decorate all of the CX.func() in the same way. One way to > do this is to add a decorator to each of the derived classes. But > this is tedious and involves modifying multiple files. > > Is there a way to modify the parent class and have the same effect? > O

decorating a method in multiple child classes

2008-07-17 Thread 1x7y2z9
Say, we have a (parent) class P. It has N child classes C1(P), C2(P) ... CN(P) Each of the child classes defines (differently) a method func(). I wish to decorate all of the CX.func() in the same way. One way to do this is to add a decorator to each of the derived classes. But this is tedious