[New-bugs-announce] [issue34753] Use coroutine object or coroutine function instead of coroutine

Windson Yang report at bugs.python.org
Thu Sep 20 11:22:10 EDT 2018


New submission from Windson Yang <wiwindson at gmail.com>:

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.

----------
assignee: docs at python
components: Documentation
messages: 325886
nosy: Windson Yang, docs at python
priority: normal
severity: normal
status: open
title: Use coroutine object or coroutine function instead of coroutine
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34753>
_______________________________________


More information about the New-bugs-announce mailing list