On Wed, Apr 29, 2015 at 3:46 PM, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
Yury Selivanov wrote:
I'm not sure
why Greg is pushing his Grammar idea so aggressively.

Because I believe that any extra complexity in the grammar
needs a very strong justification. It's complexity in the
core language, like a new keyword, so it puts a burden on
everyone's brain.

Saying "I don't think anyone would ever need to write this,
therefore we should disallow it" is not enough, given that
there is a substantial cost to disallowing it.

If you don't think there's a cost, consider that we *both*
seem to be having trouble predicting the consequences of
your proposed syntax, and you're the one who invented it.
That's not a good sign!

I have a slightly different view. A bunch of things *must* work, e.g. f(await g(), await h()) or with await f(): (there's a longer list in the PEP). Other things may be ambiguous to most readers, e.g. what does await f() + g() mean, or can we say await await f(), and the solution is to recommend adding parentheses that make things clear to the parser *and* humans. Yury's proposal satisfies my requirements, and if we really find some unpleasant edge case we can fix it during the 3.5 release (the PEP will be provisional).

--
--Guido van Rossum (python.org/~guido)