[Python-Dev] PEP 492: async/await in Python; v3 (original) (raw)

Yury Selivanov yselivanov.ml at gmail.com
Tue Apr 28 17:21:13 CEST 2015


Hi Walter,

On 2015-04-28 10:23 AM, Walter Dörwald wrote:

Key properties of coroutines:

* async def functions are always coroutines, even if they do not contain await expressions. * It is a SyntaxError to have yield or yield from expressions in an async function. Does this mean it's not possible to implement an async version of os.walk() if we had an async version of os.listdir()? I.e. for async code we're back to implementing iterators "by hand" instead of using generators for it.

For now yes. Unfortunately, we don't have time to implement coroutine-generators properly in 3.5.

Thanks, Yury



More information about the Python-Dev mailing list