That First Next Argument

Kevin Smith zenparsing at
Mon Aug 18 21:47:54 PDT 2014


It appears that the current state of affairs is that the argument supplied
to the first call of `next` on a newborn generator is "ignored and

Clearly, this means that there are some iterators which cannot be expressed
as a generator (namely, any iterator that echoes back it's `next`
arguments).  It seems like there should be parity here.

More concretely, the fact that information can be passed into generators
means that they can be used to create data sinks.  Since that first input
is inaccessible, however, this use case is made more awkward than it needs
to be; the consumer has to artificially "pump" the generator to get past
that first (useless) `next`.

Is there any way that the generator function can have access to that lost

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

More information about the es-discuss mailing list