[Python-Dev] Re: Allowing slicing of iterators

2005-01-26 Thread Fredrik Lundh
Guido van Rossum wrote: >> I'd like to see iterators become as easy to work with as lists are. At the >> moment, anything that returns an iterator forces you to use the relatively >> cumbersome itertools.islice mechanism, rather than Python's native slice >> syntax. > > Sorry. Still -1. can we pe

[Python-Dev] Re: Allowing slicing of iterators

2005-01-25 Thread Fredrik Lundh
Guido van Rossum wrote: >> As a trivial example, here's how to skip the head of a zero-numbered list: >> >>for i, item in enumerate("ABCDEF")[1:]: >> print i, item >> >> Is this idea a non-starter, or should I spend my holiday on Wednesday >> finishing >> it off and writing the documenta