Martin> In Python, things at the same indentation level all belong Martin> together. I think the point is that the collection of @-decorators and the immediately following function definition (which can be separated from each other by a lot of white space or comments, btw) effectively form a single function definition. I don't believe there are any other syntactic constructs in Python where the keyword introducing the construct ("def" in this case) doesn't occur at the beginning of the construct. Hmmm... Now that I think about it, might you "lose" an @ in a comment block since # and @ have more-or-less the same density? | might not suffer from that sort of confusion. # description of what decorator1 does # description of what decorator1 does # description of what decorator1 does @ decorator1 # description of what decorator2 does # description of what decorator2 does # description of what decorator2 does @ decorator2 # description of what func does # description of what func does # description of what func does def func(...): pass vs. # description of what decorator1 does # description of what decorator1 does # description of what decorator1 does | decorator1 # description of what decorator2 does # description of what decorator2 does # description of what decorator2 does | decorator2 # description of what func does # description of what func does # description of what func does def func(...): pass Eh, maybe not. Small point in any case, I'm sure. Skip
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