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-August/047233.html below:

[Python-Dev] Re: Call for defense of @decorators

[Python-Dev] Re: Call for defense of @decoratorsdamien morton pythondev at bitfurnace.com
Sat Aug 7 06:40:44 CEST 2004
Even though Im basically in favour of the C# style syntax, and mostly 
because I have been using C# a lot and find no problems recognising the 
syntax when I see it, I also find the "decorator on the line after the 
def" syntax appealing.

Allow me to throw this syntax into the ring:

def foo(arg1,arg2):
    \(classmethod)
    blah
    ...

def bar(low,high):
    \(accepts(int,int), returns(float))
    blah
    ...

Allow me to also throw a possible variant

def foo(arg1,arg2): \(classmethod)
    blah
    ...

def bar(low,high): \(accepts(int,int), returns(float))
    blah
    ...

I strongly feel that any decorator syntax will need some kind of matched 
pair to delimit the decorator(s). Angle-brackets (single or double) seem 
very appealing

<classmethod>
def foo(arg1,arg2):
    blah
    ...
<accepts(int,int), returns(float)>
def bar(low,high):
    blah
    ...


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