[issue26357] asyncio.wait loses coroutine return value
Yury Selivanov
report at bugs.python.org
Mon Feb 15 13:22:43 EST 2016
Yury Selivanov added the comment:
TBH I never ever needed to do membership tests on (done, failed) result of asyncio.wait. If you need to do such tests - just wrap your coroutines into tasks manually. I honestly don't understand what's the problem and why we need to change anything in asyncio or in Python. There're tons of code on asyncio now, and this is only a second time someone wants to "fix" await.
Fixing #25887 allows us to enable multiple awaits on coroutines later, but I wouldn't rush that in 3.5 or 3.6.
Restricting asyncio.wait to accept only futures will also cause a lot of pain. I'd just fix the docs with an explanation of this problem and with a snippet of code showing how to do membership tests if needed. Alternatively, we can add a wrapper for asyncio.wait (wait_futures?), that will only accept futures/tasks.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26357>
_______________________________________
More information about the Python-bugs-list
mailing list