A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-March/043880.html below:

[Python-Dev] PEP 318: Decorators last before colon

[Python-Dev] PEP 318: Decorators last before colon [Python-Dev] PEP 318: Decorators last before colonFred L. Drake, Jr. fdrake at acm.org
Wed Mar 31 23:30:11 EST 2004
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.  <fdrake at acm.org>
PythonLabs at Zope Corporation


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4