Regarding the parsing of await expression.
Shiyao Ma
i at introo.me
Sun Nov 6 06:41:06 EST 2016
Hi,
In the pep, https://www.python.org/dev/peps/pep-0492/#examples-of-await-expressions
It is said,
await await coro() is SyntaxError, instead, we should use await (await coro())
Why? because of await is not left-associative?
also, for
await -coro() , it should be written as, await (-coro())
I don't understand the point here. Why can't the parser figure out it indeed is await (-coro()) ?
Is it due to the fact Python uses LL(1) or just because of current impl doesn't do that?
Regards.
More information about the Python-list
mailing list