>> using: >> classmethod >> def func(arg1, arg2): >> pass > The one major problem that i can see with this kind of > syntax is that it is a /special case/ when standard Python > block structure does not apply. It warns you that the expressions in the "using:" block will be evaluated later -- after the "def:" block. > If we were to stick with standard Python block structure, > the 'using' syntax should really be... > using: > classmethod > def funct(arg1, arg2): > pass Typically the suite (things indented after the colon) are all of the same type. using classmethod: def funct(arg1, arg2): pass was unacceptable. using classmethod: .version = 2134 .author = "anonymous" def funct(arg1, arg2): pass gets the block structure right, but it moves true transformations (such as classmethod) too far away. (Well, unless there is only ever one decorator per function, but then this is overkill.) -jJ
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