Questions/issues regarding generators

Jason Orendorff jason.orendorff at gmail.com
Mon Mar 11 22:56:37 PDT 2013


On Mon, Mar 11, 2013 at 2:48 PM, Kevin Gadd <kevin.gadd at gmail.com> wrote:

> Another option for scenarios like open() where it is not cheap to
> create multiple distinct iterators (each starting from the beginning),
> or for scenarios where it's impossible (like a network stream) would
> be to only expose an iterator in those instances, not an iterable.
>

But then how would you use it?

If you could not use a for-of loop on it, or pass it to functions like
zip(), that is throwing the baby out with the bathwater.

-j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130312/807629e8/attachment-0001.html>


More information about the es-discuss mailing list