Questions/issues regarding generators

Jason Orendorff jason.orendorff at gmail.com
Mon Mar 11 23:56:26 PDT 2013


On Tue, Mar 12, 2013 at 1:06 AM, Dmitry Lomov <dslomov at google.com> wrote:

> At a risk of repeating myself, 'open()' scenario is handled perfectly well
> with the iterable (see my example). Example where things truly cannot be
> reiterated (I am not sure why network stream is such an example - the
> network connection can always be opened twice) are rare. One possibility
> will be to throw on the second call to iterator().


Gosh, maybe we are irreconcilable then. Implicitly opening network
connections many times seems bad to me. Same for reopening files, actually.

If I'm mistaken about Python and this is actually a common problem there,
then I'd reconsider.

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


More information about the es-discuss mailing list