def async_tuple(*coros: Awaitable) -> Tuple[Any, ...]:
"""Await on a parameters and get a tuple back.
Example: result_one, result_two = await async_tuple(gen_one(), gen_two())
"""
return tuple(await asyncio.gather(*coros))
评论列表
文章目录