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/2015-April/139524.html below:

[Python-Dev] PEP 492 vs. PEP 3152, new round

[Python-Dev] PEP 492 vs. PEP 3152, new round [Python-Dev] PEP 492 vs. PEP 3152, new roundGreg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 25 06:39:37 CEST 2015
Guido van Rossum wrote:
> Yury, could you tweak the syntax for `await` so that we can write the 
> most common usages without parentheses? In particular I'd like to be 
> able to write
> ```
> return await foo()
> with await foo() as bar: ...
> foo(await bar(), await bletch())
> ```

Making 'await' a prefix operator with the same precedence
as unary minus would allow most reasonable usages, I think.

The only reason "yield from" has such a constrained syntax
is that it starts with "yield", which is similarly constrained.
Since 'await' is a brand new keyword isn't bound by those constraints.

-- 
Greg
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