On Wed, Oct 06, 2010 at 08:35:56PM +0300, Marius Gedminas wrote: > Even more correct code would use http://pypi.python.org/pypi/decorator, > like Wyatt suggested: > > def dec1(): > @decorator > def wrap_fn(f, *args, **kw): > c.msg = 'hi' > return f(*arg,s **kw)
And of course arrogantly using the word "correct" means I'll put in a
silly typo like "arg,s" instead of "args,"...
> return wrap_fn
>
> @dec1()
> def create(self):
> return render('create_tmpl')
Marius Gedminas
--
The gates in my computer are AND, OR and NOT; they are not Bill.
signature.asc
Description: Digital signature
