Guido van Rossum added the comment:

> > there's no way to end the loop on the producing side.

> I might be missing something, but can't something similar be said of 
> queue.get()?

That's my point, actually. If you are wrapping the Queue protocol with 
__aiter__/__anext__ the caller would expect there's a way to signal to the 
latter that the loop is over (so it can raise StopAsyncIteration). But since 
.get() doesn't have a way to signal this, an async for-loop would not be able 
to terminate (other than through break).

----------

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

Reply via email to