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 ncoghlan
Recipients gvanrossum, ncoghlan, pyos, rhettinger, serhiy.storchaka
Date 2012-10-09.03:01:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349751670.03.0.472540603395.issue16150@psf.upfronthosting.co.za>
In-reply-to
Content
As discussed on python-ideas: the iterator interface is narrower than the generator interface. Tools for working with iterators are *expected* to lose the generator specific details, just as for loops do, especially when they deal with multiple iterators.

When Greg Ewing's PEP 3152 about cofunctions was discussed in the past, the possibility of a C level API to allow other objects to behave like generators was brought up - if such an API is ever adopted, then it *may* make sense to use it in itertools.

In the meantime, it's simpler if itertools is consistent about ignoring the .send(), .throw() and return value semantics of generators-as-coroutines.
History
Date User Action Args
2012-10-09 03:01:10ncoghlansetrecipients: + ncoghlan, gvanrossum, rhettinger, serhiy.storchaka, pyos
2012-10-09 03:01:10ncoghlansetmessageid: <1349751670.03.0.472540603395.issue16150@psf.upfronthosting.co.za>
2012-10-09 03:01:09ncoghlanlinkissue16150 messages
2012-10-09 03:01:08ncoghlancreate