Hi folks. If there is going to be a distinction between “transforming” and ”annotative” decorators, then I think this syntax makes the most sense: def [classmethod] my_wonderful_method(arg1, arg2): :author: "Eric Idle" :skit: "The Python Decorator Skit" :xyzzy: getNextXyzzy() :doc: """doc""" pass Wether these annotations are put into the function dict, or function.__meta__ is an implementation detail. I would like to suggest that either a traditional doc string or the annotation block appear after a def, but not both. Annotation names should be limited to identifier syntax, probably? I understand Guido has stated that he doesn't like to separate the def from the funcname because it could be hard to find, especially with long decorator chains. But if only transforming decorators are used here, it's my impression that they will tend to be short. Secondly, with transforming decorators, the meaning of the function depends on the transformation; I find "def [classmethod]" reads quite well. ---- Alexis Layton 2130 Massachusetts Ave. Apt. 6E Cambridge, MA 02140-1917 alexis.layton at post.harvard.edu
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