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
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
>
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
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
> 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
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