[Python-Dev] 2.4a2, and @decorators
Jp Calderone
exarkun at divmod.com
Tue Aug 3 18:06:12 CEST 2004
Guido van Rossum wrote:
> [snip]
>
>
> I'm speechless. If the ambiguous
>
> [classmethod]
> def foo(x):
> ...
>
> is rejected because it doesn't look like it does something to foo, how
> come there's suddenly a crop of solutions that have the same problem
> being proposed? What you write looks like a call to the function
> decorate(), followed by a function method definition. The
> "action-at-a-distance" that is presumed by the decorate() call is
> difficult to explain and a precedent for other worse hacks. Its only
> point in favor seems to be that it doesn't use '@'.
In my view, the strongest point in favor of a solution that involves
calling functions rather than changing syntax is that the functions
involved can be placed in the standard library rather than the
interpreter.
I believe a widely held view is that features can be supported by the
stdlib do not merit language changes?
Moreover, I have the impression that many people are clamoring for
this feature, no matter how it ends up looking, because they simply
*must have it*. Well, if they must have it, why wait for 2.4, when
clearly they can have it right now?
Jp
More information about the Python-Dev
mailing list