[docs] [issue24439] Feedback for awaitable coroutine documentation

Martin Panter report at bugs.python.org
Tue Jun 23 14:26:34 CEST 2015


Martin Panter added the comment:

Here is a patch with more improvements to the coroutine documentation, including:

* Remove expansion of “coroutine” glossary to include generators; it was not my original intention of this bug. Perhaps this can be dealt with separately in Issue 24087 if other people agree there is a problem.
* Add Native Coroutine Objects section to /Doc/reference/datamodel.rst describing each method
* Tweak coroutine and wrapper object doc strings to avoid generator terms
* Mention native coroutines and “await” in the asyncio Coroutines section, where the existing text only mentions generators and “yield from”
* Also recommend native coroutines, @asyncio.coroutine for calling native coroutines, etc

I changed two of the asyncio coroutine examples to use “async def” rather than generators. There is a third example that still uses generators which I did not change, because I would also have to update the sequence diagram.

----------
Added file: http://bugs.python.org/file39788/async-doc.v2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24439>
_______________________________________


More information about the docs mailing list