On 06.09.2016 03:16, Yury Selivanov wrote:
Whereas the following will produce some sort of async lists, sets, and dicts?
result = [await fun() async for fun in funcs]
result = {await fun() async for fun in funcs}
result = {fun: await fun() async for fun in funcs}
If so, how do I read values from an async list/set/dict?
Consider "funcs" to be an asynchronous generator/iterable that produces a sequence of awaitables. The above comprehensions will await on each awaitable in funcs, producing regular list, set, and dict.
So, what's the "async" good for then?