]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.8] bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables...
authorJakub Stasiak <jakub@stasiak.at>
Mon, 2 Nov 2020 11:36:38 +0000 (12:36 +0100)
committerGitHub <noreply@github.com>
Mon, 2 Nov 2020 11:36:38 +0000 (13:36 +0200)
commitad37c66adcd474e3d42a51c63ecb6a54ca2d23f2
tree1df3edf77e79beed8f87955a4f4226ce1c950318
parent1341582e165841810e2fbf89e23be0e92b4a9fdd
[3.8] bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables (GH-23073) (GH-23105)

People call wait() and as_completed() with various non-set iterables,
a list should be the most common but there are others as well[1].

Considering typeshed also documents wait()[2] and as_completed()[3]
as accepting arbitrary iterables I think it's a good idea to document
the status quo better.

[1] https://github.com/aio-libs/aiokafka/pull/672
[2] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyiGH-L161
[3] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyiGH-L40.
(cherry picked from commit 3d86d090dcbbdfdd3e5a5951cab30612d6131222)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
Doc/library/asyncio-task.rst
Lib/asyncio/tasks.py