jack1142 <kuba.kuc...@gmail.com> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39562>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to