[issue38664] await execution order leads to throw or bad syntax

2019-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: What patch are you talking about? For me, patch means something special; e.g. working fork of CPython where the proposed idea is implemented. I read await coro()[key] as 1. Function named coro() returns a dict-like object 2. An element under key is selected

[issue38664] await execution order leads to throw or bad syntax

2019-11-01 Thread rmlibre
New submission from rmlibre : If a coroutine returns a sequence, a user cannot write this clean code: >>> await coro()[index] Or, >>> await coro()[slice] Or, >>> await coro()[key] This raises a TypeError("'coroutine' object is not subscriptable"). To solve this on the user side, one must add p