Edward Loper wrote: > The new "vertical bar" syntax was proposed recently, and has gotten > almost unanimously positive feedback. In particular, of 17 responses > to the syntax, only one has been negative (see table, below). > > I'm including both of the following variants: > > |classmethod > |accepts(int, int) > |returns(float) > def foo(arg1, arg2): > ... > > def foo(arg1, arg2): > |classmethod > |accepts(int, int) > |returns(float) > ... I really like the second one maybe with '@'. For me a decorator is a property of the function like the attributes. I think this is function foo with two arguments, its a classmethod etc.. The function name and the arguments are much more important for me than the decorators. So they should be go after the doc string. Marco
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