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

[Python-Dev] new syntax for wrapping (PEP 318)

[Python-Dev] new syntax for wrapping (PEP 318) - Timothy's summaryJewett, Jim J jim.jewett at eds.com
Fri Feb 27 10:13:38 EST 2004
Delaney, Timothy C (Timothy):
>	a. def foo (bar) [baz]:
>	b. def foo (bar) as baz:
>	c. def [baz] foo (bar):

Note that c. is like Quixote

>	d. def baz foo (bar):
>	e. def foo [baz] (bar):

>	(1b) is the most visually pleasing, but the 
>	lack of syntax means that the decorator doesn't
>	stand out as well as (a). However, it's simple
>	to syntax-colour 'as', so that's close to a non-issue.

>	(1a) seems to be the most understandable, and is
>	quite visually pleasing - the decorator is obviously special,
>	but feels more like it's an explanatory note.

You left out

f. def foo (bar) mod [baz]:
       pass

The current patch is not really using a list, it is
using magic characters "[" and "]".  Given that, it
could as easily use magic characters "mod [" and "]"

Option 1.f. still has all the syntax-coloring advantages 
of 1.a., but makes it more obvious that the "mod [baz]" 
is truly an optional annotation.

("as" is the shortest suggestion for "mod", but
not the only one.  Also suggested are many variations
on "transformed_by", "modified_by", "decorators", 
"providing", "extended_by", etc.)

-jJ

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