[Python-Dev] pep 318, Decorators for Functions, Methods and Classes (original) (raw)

Guido van Rossum guido at python.org
Sat Aug 7 23:05:14 CEST 2004


I just wanted to say that I believe it should be allowed to decorate classes. There's not reason enough (reading the thread linked to by the PEP) to limit decorators this way. Like said several times in that thread, metaclasses are harder (to write and to understand) than decorators.

Also, considering that you said you would have actually wanted docstrings above the definition of a function, wouldn't this apply to classes as well? Anyway, it's an artificial limit and it would be better to be able to test it out during the alpha.

Are you volunteering to implement it?

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



More information about the Python-Dev mailing list