Little novice program written in Python
Robert Bossy
Robert.Bossy at jouy.inra.fr
Fri Apr 25 09:05:20 EDT 2008
Marc 'BlackJack' Rintsch wrote:
>> Indeed. Would it be a sensible proposal that sequence slices should
>> return an iterator instead of a list?
>>
>
> I don't think so as that would break tons of code that relies on the
> current behavior. Take a look at `itertools.islice()` if you want/need
> an iterator.
A pity, imvho. Though I can live with islice() even if it is not as
powerful as the [:] notation.
RB
More information about the Python-list
mailing list