This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients DragonFireCK, Michel Desmoulin, Samuel BOVÉE, amaury.forgeotdarc, benjamin.peterson, brandjon, dangyogi, daniel.urban, georg.brandl, gpolo, hagen, kcarnold, martin.panter, ncoghlan, pfctdayelise, pitrou, python-dev, r.david.murray, ron_adam, terry.reedy, yselivanov
Date 2016-02-15.09:04:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Michel: I suspect your code doesn’t actually get up to handling any coroutines, and the problem is in your generator expression. What is “l”, and what are the items in it? The bug should already be fixed ready for the 3.5.2 and 3.6 releases, but I can produce this on 3.5.0:

>>> l = [None]
>>> f = (coro() for coro in l) 
>>> asyncio.gather(*f)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: gather() argument after * must be a sequence, not generator

In the current 3.6 code the bug is fixed:

>>> asyncio.gather(*f)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <genexpr>
TypeError: 'NoneType' object is not callable

The reason why the second call does nothing interesting is because the generator expression has already die because of the exception, and there is nothing left to iterate:

>>> remaining = [*f]
>>> remaining
>>> asyncio.gather(*remaining)
<Future finished result=[]>
Date User Action Args
2016-02-15 09:04:19martin.pantersetrecipients: + martin.panter, georg.brandl, terry.reedy, amaury.forgeotdarc, ncoghlan, pitrou, ron_adam, dangyogi, benjamin.peterson, gpolo, hagen, kcarnold, r.david.murray, daniel.urban, python-dev, pfctdayelise, brandjon, yselivanov, DragonFireCK, Samuel BOVÉE, Michel Desmoulin
2016-02-15 09:04:18martin.pantersetmessageid: <>
2016-02-15 09:04:18martin.panterlinkissue4806 messages
2016-02-15 09:04:18martin.pantercreate