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

[Python-Dev] Call for defense of @decorators

[Python-Dev] Call for defense of @decorators [Python-Dev] Call for defense of @decorators"Martin v. Löwis" martin at v.loewis.de
Thu Aug 5 22:53:28 CEST 2004
Chris King wrote:
> Isn't this more a use case for function attributes, rather than
> decorators?  Decorators seem like overkill in this case.

I don't fully understand the issues, but I believe that the
declaration is more like a statement than a mere declaration
(very similar to all other "declarations" in Python).

In the specific case, I believe declaring the Objective-C
signature also performs some kind of registration of the
function with the Objective-C run-time. This cannot be done
with function attributes; you would still need to invoke
a do_register()/generate_wrappers() functions at some point.

Even if this is a mere declaration, function attributes would
harm readability: they would have to go after the function, whereas
you want the Objective-C signature close to the Python signature.

Regards,
Martin
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