Aahz wrote: > I've been staying out of this because I thought my preference had no > chance to make it in (i.e. I don't care between "no decorators" and "@ > decorators"), but if it's getting some revival, I want to make clear > that I think putting decorators *after* ``def``, name, and parameter > list but clearly *with* the function definition makes the most sense > for readability -- in the simple cases. Who cares about the complex > cases, because it's always going to be ugly? +1 This has been my position all along. I understand the need for decorator syntax (and even defended pie-syntax on c.l.py for that reason) but I think that of all the alternatives, list after parameters, before colon is the best alternative presented. def func (params) [decorators]: pass To me this conveys the information I need clearly and in the order that I need it - name is most important, parameters second, and the "type" of function last. The vast majority of functions are between 1 and 3 parameters. Similarly, I doubt there will be many functions with more than a couple of decorators. Having everything on a single line in the majority of cases is IMO a big win - both for readability and understandability. Tim Delaney
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