New submission from Yury Selivanov: This problem was discussed in one of the asyncio issues here: https://github.com/python/asyncio/issues/288
I propose to raise a RuntimeError if an 'await' expression is used for a coroutine object that's being awaited on already. This change shouldn't impact performance in any way. It will prevent users from writing code that behaves in a very weird ways (see the github link for an example). ---------- assignee: yselivanov components: Interpreter Core messages: 256539 nosy: asvetlov, gvanrossum, haypo, ncoghlan, yselivanov priority: normal severity: normal status: open title: awaiting on coroutine that is being awaited should be an error type: enhancement versions: Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25888> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com