P
Paul Rubin
Roman Suzi said:Bingo!
Just replace decorate with "from" and the nice syntax is found:
def f:
staticmethod
grammarrule('statement : expression')
version("Added in 2.4")
deprecatedmethod
type_(None)
from self, p:
"""docstring here"""
print p[1]
You can get rid of the keyword:
def f:
staticmethod
grammarrule('statement : expression')
version("Added in 2.4")
deprecatedmethod
type_(None)
(self, p):
"""docstring here"""
print p[1]
The syntax is if you see f without parentheses, what follows is decorators.
The outdent before the arg list makes it obvious where the arg list is.