Michel Desmoulin added the comment: It gets even weirder with coroutines involved:
>>> f = (coro() for coro in l) >>> asyncio.gather(*f) # TypeError: asyncio.gather() argument after * must be a >>> sequence, not generator >>> asyncio.gather(*[*f]) # ok Because coroutines are executed later, the last gather() doesn't show the error message. So it tricked you into thinking that the second version is ok while the first one is not. But of course, both are ok, the problem lies in a bug deeper in your coroutine triggering the TypeError. ---------- nosy: +Michel Desmoulin _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4806> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com