New submission from Thomas Wouters: In response to a question asked at Brett Cannon's Python 3.3 talk at PyCon, it occurs to me the iterators in the itertools module should participate in generator sending, so that you can do this:
def report_first_ten(g): s = itertools.islice(g, 10) yield from s print("First 10 done.") yield from g and then send (or throw) into the report_first_ten() generator, it fails (because itertools.islice() has no send method.) Similarly, perhaps itertools.izip() should gain a send method that sends into the iterators it's zipping, etc. ---------- components: Library (Lib) messages: 184273 nosy: twouters priority: normal severity: normal status: open title: stdlib generator-like iterators don't forward send/throw versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17433> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com