This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Documentation: Coroutines
Type: enhancement Stage:
Components: asyncio, Documentation Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: agarus, asvetlov, docs@python, yselivanov
Priority: normal Keywords:

Created on 2019-12-13 06:49 by agarus, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg358320 - (view) Author: RA (agarus) Date: 2019-12-13 06:49
Here: https://docs.python.org/3/library/asyncio-task.html  
it says:"To actually run a coroutine, asyncio provides three main mechanisms:"

and a few pages down it gives you a fourth mechanism:
"awaitable asyncio.gather(*aws, loop=None, return_exceptions=False)
Run awaitable objects in the aws sequence concurrently."

And it really runs awaitables:
future = asyncio.gather(*awslist) # aws are run...
...                               # some other heavy tasks
result = async future             # collect results

Shouldn't it be added to docs?
msg358329 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2019-12-13 12:50
I suggest thinking that gather() implicitly creates tasks for running coroutines.
The documentation is technically correct, enumeration of all potentially endless list of things that calls `create_task()` for wrapping passed coroutine is not very helpful, especially for the beginning document.
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83215
2019-12-13 12:50:19asvetlovsetmessages: + msg358329
2019-12-13 07:56:41xtreaksetnosy: + yselivanov, asvetlov
components: + asyncio
2019-12-13 06:49:03agaruscreate