Message245680
| Author |
martin.panter |
| Recipients |
asvetlov, docs@python, gvanrossum, martin.panter, ncoghlan, vstinner, yselivanov |
| Date |
2015年06月23日.12:26:32 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1435062393.55.0.520607608788.issue24439@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|