[Python-Dev] method decorators (PEP 318) (original) (raw)

Guido van Rossum guido at python.org
Fri Mar 26 14:08:15 EST 2004


If it's only classmethod you're worried about obscuring, why not:

def foobar(class cls, otherarg, ...): # ...

Not quite -- I'm worried about things like classmethod and staticmethod, and I want to provide you with the ability to write your own.

And then move all other decorators into some kind of delimited block in the function body, just before the docstring.

Aha! So you agree with that part. I rest my case.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list