[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
- Previous message (by thread): [Python-Dev] PEP 492: async/await in Python; v3
- Next message (by thread): [Python-Dev] PEP 492: async/await in Python; v3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 containawait
expressions. * It is aSyntaxError
to haveyield
oryield from
expressions in anasync
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
- Previous message (by thread): [Python-Dev] PEP 492: async/await in Python; v3
- Next message (by thread): [Python-Dev] PEP 492: async/await in Python; v3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]