[Python-Dev] Another approach to decorators.
Guido van Rossum
guido at python.org
Thu Aug 12 06:26:30 CEST 2004
[Various proposals suggesting the use of a single decorator block to
decorate multiple method definitions]
I'm not keen on this. I expect that beyond classmethod and
staticmethod there aren't many use cases for repeating the same
decorator exactly multiple times. It also requires indenting the
method, which I've already argued against. And lastly it removes the
decorator from the method definition again, thereby defeating the
readability goals: when you look at a def in isolation, you may forget
to look several pages up for a decorator.
I think this is too far-fetched to consider as an alternative to the
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev