[melbourne-pug] Decorators
Graeme Cross
gcross at fastmail.fm
Tue May 9 02:50:42 CEST 2006
On Tue, 09 May 2006 10:47:51 +1000, "Graeme Cross" <gcross at fastmail.fm>
said:
> On Tue, 09 May 2006 10:08:44 +1000, "Tennessee Leeuwenburg"
> <tennessee at tennessee.id.au> said:
> > Does anyone have any functional code which demonstrates the use of
> > decorators? I don't mean just
> >
> > @staticmethod
> > def foo():
> > print "bar"
> >
> > but rather something that demonstrates where and why one would make use
> > of a decorator?
> >
>
> http://wiki.python.org/moin/PythonDecoratorLibrary is a good resource.
And a quick search in the Python cookbook reveals 53 recipes that
mention decorators, and some of those recipes are both educational and
useful.
http://aspn.activestate.com/ASPN/search?query=decorator&x=0&y=0§ion=PYTHONCKBK&type=Subsection
Regards,
Graeme
--
Graeme Cross
E-mail: gcross at fastmail.net
More information about the melbourne-pug
mailing list