[Tutor] real world decorators
Kent Johnson
kent37 at tds.net
Mon Sep 21 02:42:21 CEST 2009
On Sun, Sep 20, 2009 at 3:40 PM, John <jfabiani at yolo.com> wrote:
> Hi,
>
> I think I understand what decorators are and how they work. Maybe it's just
> me but I don't know where I'd use them in my real world programming. I see
> how they work with profile or coverage but does anyone have real world uses.
Here are some examples:
http://wiki.python.org/moin/PythonDecoratorLibrary
TurboGears uses decorators to expose functions to the web. Django has
decorators for authentication and caching.
Kent
More information about the Tutor
mailing list