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

[Python-Dev] Decorators: vertical bar syntax

[Python-Dev] Decorators: vertical bar syntaxNeil Hodgson nhodgson at bigpond.net.au
Sat Aug 7 08:10:54 CEST 2004
Edward Loper:


> The new "vertical bar" syntax was proposed recently, and has gotten
> almost unanimously positive feedback.  In particular, of 17 responses
> to the syntax, only one has been negative (see table, below).
> ...
> So I wanted to see if anyone has anything *negative* to say about this
> syntax (or one of its variants).

   One advantage of '@' is that, since it is currently not found in Python
code, it is a very strong escape that can be inserted anywhere. For example,
if there is later a need or desire to annotate function arguments
individually as well as functions, or individual statements or expressions,
then @ is a better choice. For example

@RemoteCall
def Ignite(engine @Remote, environment @Copy, thrust @Float):

   may be better at associating annotations more closely with their targets
than

@RemoteCall
@Types(["p", "p", "f"])
@Copy("environment")
def Ignite(engine, environment, thrust):

   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