classification
Title: Use coroutine object or coroutine function instead of coroutine
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Windson Yang, docs@python, yselivanov
Priority: normal Keywords: patch

Created on 2018-09-20 15:22 by Windson Yang, last changed 2018-09-24 05:11 by Windson Yang.

Pull Requests
URL Status Linked Edit
PR 9523 open Windson Yang, 2018-09-24 05:11
Messages (3)
msg325886 - (view) Author: Windson Yang (Windson Yang) * Date: 2018-09-20 15:22
A PR https://github.com/python/cpython/pull/9408 solved an ambiguous problem about coroutine. Which led me to https://docs.python.org/3/library/asyncio-task.html#awaitables

> Note that in this documentation the term “coroutine” can be used for two closely related concepts:

> a coroutine function: an async def function;
> a coroutine object: object returned by calling a coroutine function.

This will let people confused. IMO we should use `coroutine object` or `coroutine function` instead of coroutine when it means an object. For instance, L22 in https://github.com/python/cpython/blob/471503954a91d86cf04228c38134108c67a263b0/Doc/library/asyncio-api-index.rst

> Create event loop, run a coroutine, close the loop.
should be
> Create event loop, run a coroutine object, close the loop.
msg325908 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2018-09-20 17:11
> This will let people confused. IMO we should use `coroutine object` or `coroutine function` instead of coroutine when it means an object.

I'm not sure that it's a good idea to apply this change everywhere, but I think in general this is a good idea.  Do you want to submit a PR?
msg325947 - (view) Author: Windson Yang (Windson Yang) * Date: 2018-09-21 03:22
Sure, I found around 7 places may need to change, I can fix some of them right, and I will put the rest links which I'm not sure in the PR comment.
History
Date User Action Args
2018-09-24 05:11:58Windson Yangsetkeywords: + patch
stage: patch review
pull_requests: + pull_request8928
2018-09-21 03:22:22Windson Yangsetmessages: + msg325947
2018-09-20 17:11:02yselivanovsetnosy: + yselivanov
messages: + msg325908
2018-09-20 15:22:10Windson Yangcreate