[Python-ideas] Decorator syntax restriction
debatem1 at gmail.com
Sat Oct 10 08:40:54 CEST 2009
On Sat, Oct 10, 2009 at 2:12 AM, Carl Johnson
<cmjohnson.mailinglist at gmail.com> wrote:
> 2009/10/8 Zac Burns:
>> Use case:
>> @noDecorator if not debug else debug
> One might also write:
> @debug if debug else lambda f: f
> def f....
> Is that too confusing though? My instinct says it's fine, but maybe
> others disagree. Still, I think the restriction should be taken off.
> We're all adults, etc.
> — Carl
I'm moving towards +1 on this- the above looks very useful to
More information about the Python-ideas