Class v.c.e.v.SlicedView(object):

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.

For example:
   s = ['a', 'b']
   t = SlicedView(s, slice(1, None))
   t[0] == 'b'
Instance VariablessequenceThe underlying sequence from which to retrieve elements.
boundsA 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.
def __init__(self, sequence, bounds):
Undocumented
def _getIndices(self):
Undocumented
def __getitem__(self, index):
Compute the index in the underlying sequence of the given view index and return the corresponding element.
RaisesIndexErrorIf index is out of bounds for the view.
ValueErrorIf self.bounds is out of bounds for self.sequence.
def __len__(self):
Compute the length of this view onto the sequence and return it.
API Documentation for vodafone-mobile-connect-card-driver-for-linux, generated by pydoctor at 2008-01-10 13:06:31.