
Ok, I'll try to summarize the current status of the feature so that I (and others) can understand if there's something to be done:
- Decorators are going in on 2.4. [...] - The @ character is used in at least two tools (Leo, IPython), and this is being considered as something bad, but not a show stopper;
- The perlish argument is non-sense;
I belive that either some different syntax which most people agree upon is raised, or we're done.
After writing this list, I thought about something which is close to the current implementation, but avoids @. If it was already suggested, please forgive me. At least I wasn't able to find it in the PEP/Wiki: <static> def method(foo): pass and also <accepts(int,int), returns(float)> def bar(low, high): ... Advantages over current syntax: - Avoids introducing a new meaningful character in the syntax; - Leaves Leo and IPython people happy; - ">" is already being used on "print >>", so special casing it wouldn't be something new; - Not acceptable in the current syntax; - Looks like a tag; -- Gustavo Niemeyer http://niemeyer.net

<accepts(int,int), returns(float)> def bar(low, high):
...
- Leaves Leo and IPython people happy;
Yep. No problem with Leo. Edward -------------------------------------------------------------------- Edward K. Ream email: edreamleo@charter.net Leo: Literate Editor with Outlines Leo: http://webpages.charter.net/edreamleo/front.html --------------------------------------------------------------------

Gustavo Niemeyer wrote:
After writing this list, I thought about something which is close to the current implementation, but avoids @. If it was already suggested, please forgive me. At least I wasn't able to find it in the PEP/Wiki:
<static> def method(foo): pass
This is discussed in the PEP: The '<...>' alternative presents parsing problems because '<' and '>' already parse as un-paired. They present a further parsing ambiguity because a right angle bracket might be a greater than symbol instead of a closer for the decorators. Regards, Martin

Gustavo Niemeyer wrote:
After writing this list, I thought about something which is close to the current implementation, but avoids @. If it was already suggested, please forgive me. At least I wasn't able to find it in the PEP/Wiki:
<static> def method(foo): pass
This is discussed in the PEP:
The '<...>' alternative presents parsing problems because '<' and '>' already parse as un-paired. They present a further parsing ambiguity because a right angle bracket might be a greater than symbol instead of a closer for the decorators.
Gotcha! Thanks for pointing me this. -- Gustavo Niemeyer http://niemeyer.net

Gustavo Niemeyer wrote:
<static> def method(foo): pass
and also
<accepts(int,int), returns(float)> def bar(low, high): ...
Advantages over current syntax:
- Avoids introducing a new meaningful character in the syntax;
- Leaves Leo and IPython people happy;
Yup (from the ipython side). Best, Fernando ps. I think I recall this havnig been discarded, but since it's not in the PEP, I don't really remember where. It may even be my memory playing tricks on me.
participants (4)
-
"Martin v. Löwis"
-
Edward K. Ream
-
Fernando Perez
-
Gustavo Niemeyer