[issue39034] Documentation: Coroutines
New submission from Rustam Agakishiev <agakishy@gmail.com>: 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? ---------- assignee: docs@python components: Documentation messages: 358320 nosy: agarus, docs@python priority: normal severity: normal status: open title: Documentation: Coroutines type: enhancement versions: Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39034> _______________________________________
Change by Karthikeyan Singaravelan <tir.karthi@gmail.com>: ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39034> _______________________________________
Andrew Svetlov <andrew.svetlov@gmail.com> added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39034> _______________________________________
participants (3)
-
Andrew Svetlov
-
Karthikeyan Singaravelan
-
Rustam Agakishiev