A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-April/044216.html below:

[Python-Dev] Re: Candidate Function Decorator

[Python-Dev] Re: Candidate Function Decorator [Python-Dev] Re: Candidate Function DecoratorPhillip J. Eby pje at telecommunity.com
Tue Apr 13 13:58:08 EDT 2004
At 01:48 PM 4/13/04 -0400, Raymond Hettinger wrote:
> > I have the impression that it is proposed that the function f will
>*not*
> > yet be bound to its name (f.func_name) in its environment at the time
>the
> > decorator is called.
>
>Hmm, that would be a change.  Currently, staticmethod() and
>classmethod() take fully formed functions as inputs.  So, if your
>impression is correct,

It is.  See PEP 318, under "Current Implementation".  Also, several 
proposed decorators such as propget/propset/propdel and "generic" rely on 
this distinction for their magic.


>there would be a small semantic difference
>between the [classmethod] prefix and f=classmethod(f) postfix
>decoration.

Yes, and that's the desired semantics, as it makes possible many things 
that are quite awkward with the existing syntax.


More information about the Python-Dev mailing list

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