This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def gather_dict(tasks: dict): | |
async def mark(key, coro): | |
return key, await coro | |
return { | |
key: result | |
for key, result in await gather( | |
*(mark(key, coro) for key, coro in tasks.items()) | |
) | |
} |