A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20150428/894400a3/attachment.html below:

<p dir="ltr">I don't care for await await x.</p>
<div class="gmail_quote">On Apr 28, 2015 6:53 PM, "Yury Selivanov" <<a href="mailto:yselivanov.ml@gmail.com">yselivanov.ml@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looking at the grammar -- the only downside of the current approach is that<br>
you can't do 'await await fut'.  I still think that it reads better with<br>
parens.  If we put 'await' to 'factor' terminal we would allow<br>
<br>
  Â  await -fut  # await (-fut)<br>
<br>
I think I something like<br>
<br>
  Â  power: atom_expr ['**' factor]<br>
  Â  atom_expr: [AWAIT] atom_expr | atom_trailer<br>
  Â  atom_trailer: atom trailer*<br>
<br>
will fix 'await await' situation, but does it really need to be fixed?<br>
<br>
Yury<br>
<br>
<br>
<br>
On 2015-04-27 9:44 AM, Yury Selivanov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Greg,<br>
<br>
I don't want this: "await a() * b()" to be parsed, it's not meaningful.<br>
<br>
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)<br>
<br>
Yury<br>
<br>
<br>
On 2015-04-27 8:52 AM, Greg Ewing wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yury Selivanov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've done some experiments with grammar, and it looks like<br>
we indeed can parse await quite differently from yield. Three<br>
different options:<br>
</blockquote>
<br>
You don't seem to have tried what I suggested, which is<br>
to make 'await' a unary operator with the same precedence<br>
as '-', i.e. replace<br>
<br>
  Â factor: ('+'|'-'|'~') factor | power<br>
<br>
with<br>
<br>
  Â factor: ('+'|'-'|'~'|'await') factor | power<br>
<br>
That would allow<br>
<br>
  await a()<br>
  res = await a() + await b()<br>
  res = await await a()<br>
  if await a(): pass<br>
  return await a()<br>
  print(await a())<br>
  func(arg=await a())<br>
  await a() * b()<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</blockquote></div>

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