This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author twouters
Recipients twouters
Date 2013-03-15.22:37:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363387068.19.0.285872476506.issue17433@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-03-15 22:37:48twouterssetrecipients: + twouters
2013-03-15 22:37:48twouterssetmessageid: <1363387068.19.0.285872476506.issue17433@psf.upfronthosting.co.za>
2013-03-15 22:37:48twouterslinkissue17433 messages
2013-03-15 22:37:47twouterscreate