You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Python
The decorator module [1] written by Michele Simionato is a very useful
tool for maintaining function signatures while applying a decorator.
Many different projects implement their own versions of the same
functionality, for example turbogears has its own utility for this, I
guess others do something similar too.
Was the issue whether to include this module in the stdlib raised? If
yes, what were the arguments against it? If not, what do you folks
think, shouldn't it be included? I certainly think it should be.
Cheers,
Daniel
[1] http://pypi.python.org/pypi/decorator
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Daniel Fetchinson, Python
On Mon, Apr 6, 2009 at 5:41 PM, Daniel Fetchinson
<
fetch...@googlemail.com> wrote:
> The decorator module [1] written by Michele Simionato is a very useful
> tool for maintaining function signatures while applying a decorator.
> Many different projects implement their own versions of the same
> functionality, for example turbogears has its own utility for this, I
> guess others do something similar too.
>
> Was the issue whether to include this module in the stdlib raised? If
> yes, what were the arguments against it? If not, what do you folks
> think, shouldn't it be included? I certainly think it should be.
Similar functionality is already provided by
functools.update_wrapper() and functools.wraps().
See http://docs.python.org/library/functools.html
You might consider proposing the modification of these functions instead.
Cheers,
Chris
--
I have a blog:
http://blog.rebertia.com
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
On Apr 7, 2:50 am, Chris Rebert <
c...@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
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Python
>> 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.
Exactly, that's why I think the decorator module would be a useful
addition to functools.
> 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.
I've posted it to python-dev:
http://mail.python.org/pipermail/python-dev/2009-April/088387.html
Cheers,
Daniel
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
On Apr 7, 7:57 am, Daniel Fetchinson <
fetchin...@googlemail.com>
wrote:
> > 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.
>
> I've posted it to python-dev:
>
>
http://mail.python.org/pipermail/python-dev/2009-April/088387.htmlIf the PEP is implemented and it becomes possible
to fiddle with the function signature directly,
then the decorator module would become trivial
to implement and actually nearly useless.
I would happy with that, less code to maintain ;)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4