[issue42140] asyncio.wait function creates futures set two times

Diogo Dutra report at bugs.python.org
Mon Oct 26 16:28:26 EDT 2020


Diogo Dutra <diogodutradamata at gmail.com> added the comment:

> Are you suggesting this is a bug, or is it just a suggested code cleanup?

It is a suggested code cleanup.

My point is that the code creates two sets based on the Sequence `fs`.
I think it is better if the code creates the set just one time, instead of
two times.

Em dom., 25 de out. de 2020 às 18:57, Chris Jerdonek <report at bugs.python.org>
escreveu:

>
> Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:
>
> Are you suggesting this is a bug, or is it just a suggested code cleanup?
> I ask because the docs suggest that a set should be passed:
> https://docs.python.org/3/library/asyncio-task.html#asyncio.wait
>
> And the docstring says it should be a sequence:
>
> https://github.com/python/cpython/blob/d1a0a960ee493262fb95a0f5b795b5b6d75cecb8/Lib/asyncio/tasks.py#L373-L376
>
> So while code cleanup is okay, I'm not sure support for general iterator
> arguments can / should be guaranteed.
>
> ----------
> nosy: +chris.jerdonek
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue42140>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42140>
_______________________________________


More information about the Python-bugs-list mailing list