class documentation

class islice_extended: (source)

View In Hierarchy

An extension of :func:`itertools.islice` that supports negative values for *stop*, *start*, and *step*. >>> iterable = iter('abcdefgh') >>> list(islice_extended(iterable, -4, -1)) ['e', 'f', 'g'] Slices with negative values require some caching of *iterable*, but this function takes care to minimize the amount of memory required. For example, you can use a negative step with an infinite iterator: >>> from itertools import count >>> list(islice_extended(count(), 110, 99, -2)) [110, 108, 106, 104, 102, 100] You can also use slice notation directly: >>> iterable = map(str, count()) >>> it = islice_extended(iterable)[10:20:2] >>> list(it) ['10', '12', '14', '16', '18']

Method __getitem__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __next__ Undocumented
Instance Variable _iterable Undocumented
def __getitem__(self, key): (source)

Undocumented

def __init__(self, iterable, *args): (source)

Undocumented

def __iter__(self): (source)

Undocumented

def __next__(self): (source)

Undocumented

_iterable = (source)

Undocumented