[Python-Dev] Re: decorators and 2.4
David Abrahams
dave at boost-consulting.com
Fri Jun 25 20:43:27 EDT 2004
"Phillip J. Eby" <pje at telecommunity.com> writes:
> +classmethod
> +attrs(spam="fidget")
> def foo(...):
> ...
>
> [classmethod(), attrs(spam="fidget")]
> def foo(...):
> ...
>
> ~classmethod
> ~attrs(spam="fidget")
> def foo(...):
> ...
>
> -classmethod
> -attrs(spam="fidget")
> def foo(...):
> ...
>
> All of these are possible, and each likely to have *some*
> proponents. Oh, and let's not forget the question of application
> order of the decorations. :) I personally favor a(b(c(...)))
> ordering for decorations that are listed before the 'def', even
> though I favor a(), b(), c() ordering for decorations that come
> after.
I don't think any of these syntaxes allow classmethod to remain what
it is, a "regular" function... not that I consider it a prerequisite
or anything.
--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
More information about the Python-Dev
mailing list