'Return the index of the first occurrence of ``value`` in this
list that is greater than or equal to ``start`` and less than
``stop``.  Negative start and stop values are treated like negative
slice bounds -- i.e., they count from the end of the list.'

def index(self, value, start=None, stop=None):

    (start, stop) = slice_bounds(self, slice(start, stop))
    for (i, elt) in enumerate(islice(self, start, stop)):
        if (elt == value):
            return (i + start)
    raise ValueError('index(x):    x    not    in    list')
