Skip to content

[3.9] bpo-40405: Fix asyncio.as_completed docs (GH-19753) #20337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,9 @@ Waiting Primitives
.. function:: as_completed(aws, \*, loop=None, timeout=None)

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
set concurrently. Return an iterator of :class:`Future` objects.
Each Future object returned represents the earliest result
from the set of the remaining awaitables.
set concurrently. Return an iterator of coroutines.
Each coroutine returned can be awaited to get the earliest next
result from the set of the remaining awaitables.

Raises :exc:`asyncio.TimeoutError` if the timeout occurs before
all Futures are done.
Expand All @@ -597,8 +597,8 @@ Waiting Primitives

Example::

for f in as_completed(aws):
earliest_result = await f
for coro in as_completed(aws):
earliest_result = await coro
# ...


Expand Down