StarWing wrote:

> I had checked it for serval times. maybe it's my inattention :-(. but
> what i could find the nearest thing is itertools.islice. but it can't
> process negative index 

A negative index -n is an abbreviation for len(sequence) - n.
Since iterables in general do not have a length, islice(iterable) cannot
handle the abbreviation. If you pass a sequence to islice, just
un-abbreviate negative indexes.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to