[Python-Dev] method decorators (PEP 318)
marktrussell at btopenworld.com
Sat Mar 27 13:47:09 EST 2004
On Sat, 2004-03-27 at 18:26, Skip Montanaro wrote:
> I would propose a counterargument. Placing it between the argument list and
> the colon puts it "close enough" to the "def".
Absolutely. Another point: the most common use of a function signature
is reading it to see how to call the function. For this, classmethod is
not that important -- it doesn't affect how you call the function, only
how it is defined. The only effect on the call is "can I call this with
just a class rather than an instance" - someone wanting an answer to
that question is quite capable of reading to the end of a def line.
Given that classmethod and staticmethod are probably about as
significant as function modifiers get, putting them right next to the
def is giving them way too much prominence (and I use classmethod quite
More information about the Python-Dev