Guido: > As a human reader, I like seeing the attributes before the arguments > because some attributes (like classmethod and staticmethod) affect the > interpretation of the argument list. On the other hand, this weakens the syntactic parallels between function definitions and function calls. Somehow, a def which doesn't have an open paren immediately after the function name doesn't look function-definition-ish to me. With suitable argument naming conventions, the argument list itself usually gives enough cues to make it clear if it's a classmethod or staticmethod: def foo(self, x, y, z): # self => it's a normal method def bar(cls, x, y, z) [classmethod]: # cls => it's a class method def baz(x, y, z) [staticmethod]: # neither self nor cls => it's a static method Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
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