[Python-Dev] PEP 492: async/await in Python; v3 (original) (raw)
Walter Dörwald walter at livinglogic.de
Tue Apr 28 16:23:31 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 ]
On 28 Apr 2015, at 5:07, Yury Selivanov wrote:
Hi python-dev,
Another round of updates. Reference implementation has been updated: https://github.com/1st1/cpython/tree/await (includes all things from the below summary of updates + tests). [...] New Coroutine Declaration Syntax -------------------------------- The following new syntax is used to declare a coroutine:: async def readdata(db): pass 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.
[...]
Servus, Walter
- 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 ]