decorator module in stdlib?
Michele Simionato
michele.simionato at gmail.com
Tue Apr 7 00:20:02 EDT 2009
On Apr 7, 2:50 am, Chris Rebert <c... at rebertia.com> wrote:
> Similar functionality is already provided by
> functools.update_wrapper() and functools.wraps().
> Seehttp://docs.python.org/library/functools.html
> You might consider proposing the modification of these functions instead.
Unfortunately functools.update_wrapper() and functools.wraps()
are NOT equivalent to the decorator module. My original
plan when I wrote the decorator module was to make aware
people that the corrent support for decorators in the language
is insufficient. I have always seen the decorator module
as a temporary hack waiting for a proper solution
at the language level. I wanted the possibility to modify the
signature of a function. Everybody more or less agreed
that this was a good idea on python-dev, and there is
also a PEP:
http://www.python.org/dev/peps/pep-0362/
However, AFAIK, the PEP is still in draft status.
Perhaps people wanting this should make some noise
on python-dev.
Michele Simionato
More information about the Python-list
mailing list