R. David Murray added the comment:
How about something like:
for x in my_generator():
pass # Exhaust co-routine generator to make sure all data is processed.
I have no idea if you'd ever actually do that in a well-structured co-routine
context, though, not having written very much of that kind of code.
----------
nosy: +r.david.murray
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22106>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com