A good decorator library

Tim Roberts timr at probo.com
Sat Oct 23 23:58:39 EDT 2010


Felipe Bastos Nunes <felipe.bastosn at gmail.com> wrote:
>
>Hi! I was looking for a good decorator library to study and make my
>own decorators. I've read the Bruce Eckel's blog at artima dot com.
>But I need some more examples. I'm building a WSN simulator like SHOX
>is in java, but programming it in python. I'd like to use decorators
>to set methods that would be logged as statistics and some more
>funcionalities like check a method to check the params' types.

Be careful with this.  Decorators have their uses, but it is very easy to
make a program completely unreadable through the unjudicious use of
decorators.

It is not good programming to use a language freature just because it is
there.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list