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-August/046915.html below:

[Python-Dev] Call for defense of @decorators

[Python-Dev] Call for defense of @decorators [Python-Dev] Call for defense of @decoratorsNeil Schemenauer nas at arctrix.com
Thu Aug 5 21:45:23 CEST 2004
On Thu, Aug 05, 2004 at 09:28:13PM +0200, Ronald Oussoren wrote:
> On 5-aug-04, at 21:17, Gustavo Niemeyer wrote:
> >   def funcname(...):
> >      ...
> >   funcname.signature = "v@:@i"
> 
> That should be workable for this specific example.

Even nicer if '_' is bound to the last function defined.

    class SomeClass(objc):
        def funcname(...):
           ...
        _.signature = "v@:@i"

The objc metaclass could take the 'signature' function attribute and
transform the function.

> It wouldn't work for the objc.accessor example. The objc.accessor
> function/decorator deduces the right kind of signature from the
> name and arguments of the function.

Can't the metaclass do that?

  Neil
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