From 81391a3a79630eec1e1caf0bc21102838f88d0e2 Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Mon, 24 Apr 2023 14:22:14 +0530 Subject: [PATCH] fix docs for 3.11 --- Doc/library/asyncio-task.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 02fc38495879cc..bfefe8e3815b85 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -757,7 +757,7 @@ Waiting Primitives iterable concurrently and block until the condition specified by *return_when*. - The *aws* iterable must not be empty. + The *aws* iterable must not be empty and generators yielding tasks are not accepted. Returns two sets of Tasks/Futures: ``(done, pending)``. @@ -805,7 +805,8 @@ Waiting Primitives .. function:: as_completed(aws, *, timeout=None) Run :ref:`awaitable objects ` in the *aws* - iterable concurrently. Return an iterator of coroutines. + iterable concurrently. Generators yielding tasks are not accepted + as *aws* iterable. Return an iterator of coroutines. Each coroutine returned can be awaited to get the earliest next result from the iterable of the remaining awaitables.