Questions/issues regarding generators

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

On Tue, Mar 12, 2013 at 1:06 AM, Dmitry Lomov <dslomov at> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list