> > > What about: > > > > > > [as classmethod] > > > def foo(bar, baz): > > > pass > Since that is illegal syntax today, it would alleviate my primary > concern with decorator-before-def syntax. And the 'as' keyword does > help tie it to the following def. Indeed. And we could even extend it to allow a single set of decorators to apply to multiple function definitions, as follows: [as classmethod]: def foo(bar, baz): pass def bar(foo, baz): pass Of course, the colon would be required if and only if an indent follows it. (I still prefer decorators after the parameters, but this version pretty much solves the same problems and answers my non-aesthetic objections)
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