Guido van Rossum added the comment:

I wonder if the right solution isn't to insist that the arguments to await() 
are Futures, not coroutines. While in many cases (e.g. gather(), wait_for()) 
it's a useful convention to support either coroutines or Futures, for wait() it 
does seem pretty useless. Mapping the Futures back to coroutines isn't a good 
solution either, since you can't get the result out of just the coroutine.

The question is whether we can just change this or whether we should issue some 
kind of deprecation warning, since it's at least conceivable that someone 
relies on the current behavior and doesn't care about mapping results back to 
coroutines (e.g. if the results are self-identifying).

The same issue applies to as_completed(), I think.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26357>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to