Message260300
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. |
|
Date |
User |
Action |
Args |
2016-02-15 08:34:35 | Michel Desmoulin | set | recipients:
+ Michel Desmoulin, georg.brandl, terry.reedy, amaury.forgeotdarc, ncoghlan, pitrou, ron_adam, dangyogi, benjamin.peterson, gpolo, hagen, kcarnold, r.david.murray, daniel.urban, python-dev, pfctdayelise, martin.panter, brandjon, yselivanov, DragonFireCK, Samuel BOVÉE |
2016-02-15 08:34:35 | Michel Desmoulin | set | messageid: <1455525275.07.0.0887253878658.issue4806@psf.upfronthosting.co.za> |
2016-02-15 08:34:35 | Michel Desmoulin | link | issue4806 messages |
2016-02-15 08:34:34 | Michel Desmoulin | create | |
|