[Python-Dev] Re: PEP 318: Decorators last before colon -- another new syntax idea (original) (raw)
David Abrahams dave at boost-consulting.com
Fri Apr 2 13:16:46 EST 2004
- Previous message: [Python-Dev] Re: PEP 318: Decorators last before colon -- another new syntax idea
- Next message: [Python-Dev] Re: PEP 318: Decorators last before colon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Andrew Koenig" <ark-mlist at att.net> writes:
Has something along these lines been discussed?
with [staticmethod, classmethod]: def foo(x): pass def bar(x): pass IIUC, the PyObjC application needs whole swathes of functions with the same decoration, but this syntax isn't much worse for one function than for many. If I understand it correctly, the motivation for this idea is to try to avoid cluttering the definitions with large numbers of decorators.
Actually no. It was that other syntaxes such as
as: [whatever] def foo(): pass
seemed to lack the scoping that needed to make the "as" part apply to the definition.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
- Previous message: [Python-Dev] Re: PEP 318: Decorators last before colon -- another new syntax idea
- Next message: [Python-Dev] Re: PEP 318: Decorators last before colon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]