Consume an async iterator into a list. Async equivalent of list(it).
(it)
| 40 | |
| 41 | |
| 42 | async def alist(it): |
| 43 | """Consume an async iterator into a list. Async equivalent of list(it).""" |
| 44 | return [i async for i in it] |
| 45 | |
| 46 | |
| 47 | def spawn(f, args=None): |
no outgoing calls