Message361445
I also noticed that putting `await` before the async comprehension will make the code inside the comprehension run (though after it runs, it will fail on awaiting list):
>>> await [await asyncio.sleep(1, print(x)) for x in range(5)]
0
1
2
3
4
Traceback (most recent call last):
File "C:\Python38\lib\concurrent\futures\_base.py", line 439, in result
return self.__get_result()
File "C:\Python38\lib\concurrent\futures\_base.py", line 388, in __get_result
raise self._exception
File "<console>", line 1, in <module>
TypeError: object list can't be used in 'await' expression |
|
Date |
User |
Action |
Args |
2020-02-05 17:33:21 | jack1142 | set | recipients:
+ jack1142, asvetlov, yselivanov |
2020-02-05 17:33:21 | jack1142 | set | messageid: <1580924001.3.0.107287581478.issue39562@roundup.psfhosted.org> |
2020-02-05 17:33:21 | jack1142 | link | issue39562 messages |
2020-02-05 17:33:21 | jack1142 | create | |
|