Part of vmc.contrib.epsilon.view View In Hierarchy
Wrapper around a sequence which allows indexing and non-extended
slicing, adjusting all indices using a transformation defined by a
slice
object.
s = ['a', 'b'] t = SlicedView(s, slice(1, None)) t[0] == 'b'
Instance Variables | sequence | The underlying sequence from which to retrieve elements. |
bounds | A slice instance defining the boundaries of this view.
|
Method | __init__ | Undocumented |
Method | __getitem__ | Compute the index in the underlying sequence of the given view index |
Method | __len__ | Compute the length of this view onto the sequence and return it. |