469,270 Members | 1,698 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Re: manipulating class attributes from a decorator while the class isbeing defined

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 is an ugly this to do because the first way is far more
elegant :)

GPG key: 0x04B3BB96

Version: GnuPG v1.4.6 (GNU/Linux)


Jun 27 '08 #1
0 702

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Humpty Dumpty | last post: by
2 posts views Thread by lcaamano | last post: by
reply views Thread by emin.shopper | last post: by
6 posts views Thread by Chris Fonnesbeck | last post: by
13 posts views Thread by Hussein B | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.