[Python-Dev] Re: @decorators, the PEP and the "options" out there?
Terry Reedy
tjreedy at udel.edu
Thu Aug 5 23:03:17 CEST 2004
"Nicolas Fleury" <nidoizo at yahoo.com> wrote in message
news:ceu2ec$ugo$1 at sea.gmane.org...
> IxokaI wrote:
> Is there ambiguities with the following?
>
> def decorator1(decoratorN(foo))(arg1, argN): pass
> def decorator1(decoratorN(foo(arg1, argN))): pass
> def(decorator1, decoratorN) foo(arg1, argN): pass
If you name the decos decorator1, etc, not really ambigous, mearly hard to
find the foo in the soup. But try
def bar(baz(foo))(a1,aN): pass
and it becomes easily ambigous. Anyway, by current Python syntax,
decoN(foo) look like a function call on an *existing* object foo. The
current situation is that name(arg) is always a func call except when name
*immediately* follows def. Like Tim, I really don't want that to change.
Terry J. Reedy
More information about the Python-Dev
mailing list