Alternative decorator syntax decision
Robin Becker
robin at reportlab.com
Wed Aug 25 12:58:17 EDT 2004
Avner Ben wrote:
> I believe putting the decorator list before the function header is
> generally a bad design decision. While it may make parsing-related
> sense, it violates Python's greatest asset: being executable pseudocode.
> The way I see it, the latter quality means being able to look at the
> code and see clearly and immediately what requirements from the real
> world the code was written the serve. Functions and methods are major
.....
except that these wrappers/transformers/decorators are able to do what they like
to the code including turning methods into properties, changing the argument
list etc etc etc.
All the pain of self modifying code will be available :) as it already is, but
with a new funky syntax to make it seem OK.
I also don't like the def coming last, but if the thing isn't what you think it
is the "here be dragons" is probably a good idea.
--
Robin Becker
More information about the Python-list
mailing list