Mark> Just a data point from a user: I use classmethod fairly Mark> frequently, and I would *love* to see some syntax to support it. Mark> As has been pointed out before, classmethod (and staticmethod) are Mark> a part of the interface of a function, and shouldn't be tacked on Mark> to the end of the body. Please let me put them where people (and Mark> hopefully pydoc and pychecker) can easily see them. Mark> I marginally prefer [] to "as", but I don't have strong feelings Mark> either way. Both seem quite readable and pythonic to me. I'll add another data point. Quixote'd PTL uses almost this exact syntax to distinguish between PTL functions/methods which return HTML or plain text. The only difference is that it places the annotation before the argument list: def head [html] (title): ''' <head> <title>%(title)s</title> ''' % locals() threecol_css() '</head>' I haven't heard any Quixote users complain about the construct. (I don't know if PTL supports more than one annotation per function or not. I think the only choices are currently "html" or "text", which are obviously mutually exclusive.) 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