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: Asyncio-namespace helpers for async_generators
Type: enhancement Stage: resolved
Components: asyncio, Library (Lib) Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Codey Oxley, Scott Russ, asvetlov, yselivanov
Priority: normal Keywords:

Created on 2017-03-01 18:52 by Codey Oxley, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg288773 - (view) Author: Codey Oxley (Codey Oxley) Date: 2017-03-01 18:52
Expanding an async_generator to any container-type currently makes you do an async-for loop/comprehension. There are some third-party libs (aitertools) that have helpers but it would be nice for this to be upstream for list, tuple, dict, set, etc.

Usage might be:

expanded: List[int] = await asyncio.list(gen())
msg308803 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-20 20:17
asyncio is a library for asynchronous network communications and related stuff.

Converting async iterator into a list is out of scope of the library.

If you want incorporate aitertools into Python stdlib -- please create a separate issue (but better discuss it in python-ideas mailing list first).
History
Date User Action Args
2022-04-11 14:58:43adminsetgithub: 73875
2017-12-20 20:17:04asvetlovsetstatus: open -> closed

nosy: + asvetlov
messages: + msg308803

resolution: wont fix
stage: resolved
2017-03-01 19:16:36Scott Russsetnosy: + Scott Russ
2017-03-01 18:55:36gvanrossumsetnosy: - gvanrossum
2017-03-01 18:52:55Codey Oxleycreate