[Python-ideas] Syntax for defining parametric decorators
Mike Graham
mikegraham at gmail.com
Mon Jul 9 03:11:00 CEST 2012
On Sun, Jul 8, 2012 at 6:54 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Beyond that, no, this is too limited - it only helps when there's no extra
> code in the outer scope which, in my experience, is the exception rather
> than the rule.
I'm not sure I think that's the case. functools.wraps,
functools.lru_cache, and reprlib.recursive_repr are the only stdlib
decorator factories I could think of, and all of them could use this
syntax. So could the ones I could quickly find in my own code.
Mike
More information about the Python-ideas
mailing list