[Tutor] Decorators

Alan Gauld alan.gauld at btinternet.com
Thu Jul 1 02:14:05 CEST 2010

"Mary Morris" <marris1031 at gmail.com> wrote

> anything.  I need to find out every decorator and make sure it has a
> descriptive name.  I was thinking I could write a simple script 
> which would
> parse through all of the source files and find decorators-maybe by 
> looking
> for the @ symbol?

I would first try a good IDE. I don't have it installed at the moment 
but I
think pydev for Eclipse can find decorator definitions. Combined with
a power search to locate all uses of decorators that might be easier.

Just a thought and I might be remembering wrong. But if you are doing
serious Python coding Eclipse and PyDev are a good combination.

It should also be possible to get GNU tags to handle decoratiors too - 
already works with Pythion and vim will work with tags...

In other words don't be too quick to jump to a programming solution,
OS level tools may be a better first step. Especially if you are on 


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list