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

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

[Python-Dev] PEP 492 vs. PEP 3152, new roundYury Selivanov yselivanov.ml at gmail.com
Mon Apr 27 15:44:00 CEST 2015
Hi Greg,

I don't want this: "await a() * b()" to be parsed, it's not meaningful.

Likely you'll see "await await a()" only once in your life, so I'm fine 
to use parens for it (moreover, I think it reads better with parens)

Yury


On 2015-04-27 8:52 AM, Greg Ewing wrote:
> Yury Selivanov wrote:
>> I've done some experiments with grammar, and it looks like
>> we indeed can parse await quite differently from yield. Three
>> different options:
>
> You don't seem to have tried what I suggested, which is
> to make 'await' a unary operator with the same precedence
> as '-', i.e. replace
>
>    factor: ('+'|'-'|'~') factor | power
>
> with
>
>    factor: ('+'|'-'|'~'|'await') factor | power
>
> That would allow
>
>   await a()
>   res = await a() + await b()
>   res = await await a()
>   if await a(): pass
>   return await a()
>   print(await a())
>   func(arg=await a())
>   await a() * b()
>

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