On Aug 13, 2004, at 7:31 PM, Michael Sparks wrote: > Syntax option J2 from the wiki seems to have provoked an interesting > discussion[1] at least by a small subset of c.l.p, so I wondered how > difficult it would be to implement - this turned out to be relatively > simple [2]. > [1] > http://mail.python.org/pipermail/python-list/2004-August/233413.html > [2] > http://mail.python.org/pipermail/python-list/2004-August/233591.html > (implementation) > > #Syntax J2 from http://www.python.org/moin/PythonDecorators > decorate: > staticmethod > grammarrule('statement : expression') > versioninfo("Added in 2.4") > deprecated > typeinfo(None) > def p_statement_expr(self, p): > print p[1] My only problem with this syntax is that I expect the common cases (mine, anyway) to be zero or one decorators per function, so the extra block and indent seems a bit excessive compared to the current @prefix-symbol-decorator proposal(s). It is, of course, far better than typing the function name three times though! :) -0 -bob
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