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 read_data(db):
     pass

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.

[...]

Servus,
   Walter
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to