Andrew Svetlov <andrew.svet...@gmail.com> added the comment:
I recall the idea of passing a specific flag to `compile()` for accepting await and family on top level of passed code string. Than compile can return a code object with CO_COROUTINE flag set. Returned code object can be analyzed for this flag and executed with `await exec(code)`. Actual coroutine executor can be asyncio/trio/twisted/whatever, it depends on what code calls this `await`. Did I miss something? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34616> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com