Re: manipulating class attributes from a decorator while the class is being defined

2008-04-21 Thread Gerard Flanagan
On Apr 19, 11:19 pm, Wilbert Berendsen <[EMAIL PROTECTED]> wrote: > Hi, is it possible to manipulate class attributes from within a decorator > while the class is being defined? > > I want to register methods with some additional values in a class attribute. > But I can't get a decorator to change

Re: manipulating class attributes from a decorator while the class is being defined

2008-04-21 Thread Duncan Booth
Wilbert Berendsen <[EMAIL PROTECTED]> wrote: > Hi, is it possible to manipulate class attributes from within a > decorator while the class is being defined? > > I want to register methods with some additional values in a class > attribute. But I can't get a decorator to change a class attribute >

Re: manipulating class attributes from a decorator while the class is being defined

2008-04-21 Thread Bruno Desthuilliers
Wilbert Berendsen a écrit : > Hi, is it possible to manipulate class attributes from within a decorator > while the class is being defined? > > I want to register methods with some additional values in a class attribute. > But I can't get a decorator to change a class attribute while the class i

Re: manipulating class attributes from a decorator while the class is being defined

2008-04-19 Thread Arnaud Delobelle
On Apr 19, 10:19 pm, Wilbert Berendsen <[EMAIL PROTECTED]> wrote: > Hi, is it possible to manipulate class attributes from within a decorator > while the class is being defined? > > I want to register methods with some additional values in a class attribute. > But I can't get a decorator to change

Re: manipulating class attributes from a decorator while the class is being defined

2008-04-19 Thread Karl-Heinz Ruskowski
> How can I reach the class attribute `regexps' from within a decorator? Now, the first way that comes to my mind is simply overloading the class and set your regexps variable in your new class. The other way is to create an object and set it more manually (obj.regexps = ['.*']). Which for me i

Re: manipulating class attributes from a decorator while the class is being defined

2008-04-19 Thread Christian Heimes
Wilbert Berendsen schrieb: > Hi, is it possible to manipulate class attributes from within a decorator > while the class is being defined? > > I want to register methods with some additional values in a class attribute. > But I can't get a decorator to change a class attribute while the class is

manipulating class attributes from a decorator while the class is being defined

2008-04-19 Thread Wilbert Berendsen
Hi, is it possible to manipulate class attributes from within a decorator while the class is being defined? I want to register methods with some additional values in a class attribute. But I can't get a decorator to change a class attribute while the class is still being defined. Something like