[Python-Dev] Re: Call for defense of @decorators (original) (raw)
damien morton pythondev at bitfurnace.com
Sat Aug 7 06:40:44 CEST 2004
- Previous message: [Python-Dev] Re: Call for defense of @decorators
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
def foo(arg1,arg2): blah ... def bar(low,high): blah ...- Previous message: [Python-Dev] Re: Call for defense of @decorators
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]