[Python-Dev] Re: Allowing slicing of iterators
Fredrik Lundh
fredrik at pythonware.com
Tue Jan 25 18:39:54 CET 2005
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 documentation and tests for it?
>
> Since we already have the islice iterator, what's the point?
readability? I don't have to import seqtools to work with traditional
sequences, so why should I have to import itertools to be able to use
the goodies in there? better leave that to the compiler.
</F>
More information about the Python-Dev
mailing list