[Python-Dev] PEP 318: Decorators last before colon (original) (raw)
Fred L. Drake, Jr. fdrake at acm.org
Wed Mar 31 23:30:11 EST 2004
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] PEP 318: Decorators last before colon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Regarding
[decorator]
def func(arg, arg):
# stuff...
On Wednesday 31 March 2004 10:41 pm, Barry Warsaw wrote:
I don't like it. It already has a meaning (albeit fairly useless) and it doesn't seem obvious from just looking at it that the decorator is connected to the following method. It doesn't taste Pythonic to me.
Whether or not we're arbiters of what's Pythonic, this syntax is quite sad, though I'll grant that it's better than variations along the line of
decorate:
decorator
def func(arg, arg):
# stuff...
I think Phillip Eby's observation that people who want to use decorators want something different is quite telling. I'm with Phillip in preferring
def func(arg, arg) [decorator]:
# stuff...
-Fred
-- Fred L. Drake, Jr. PythonLabs at Zope Corporation
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] PEP 318: Decorators last before colon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]