syntax enhancement

Ian Kelly ian.g.kelly at gmail.com
Wed Oct 5 17:46:15 EDT 2011


On Wed, Oct 5, 2011 at 3:28 PM, Westley Martínez <anikom15 at gmail.com> wrote:
> Wait, how would this work fundamentally?  A list can be sliced because
> all the values are there.  A generator does not have all its value at
> once (it generates each value as requested).  I don't like change so I
> look at these kinds of suggestions with lots of scrutiny and biased
> criticism.

Like islice, it would return an iterator that lazily pulls values from
the generator as they are requested, discarding unneeded values as
necessary.



More information about the Python-list mailing list