'Assign values to a slice of the object'

def _set_slice(self, index, values):

    try:
        iter(values)
    except TypeError:
        raise TypeError('can    only    assign    an    iterable    to    a    slice')
    self._check_allowed(values)
    origLen = len(self)
    valueList = list(values)
    (start, stop, step) = index.indices(origLen)
    if (index.step is None):
        self._assign_simple_slice(start, stop, valueList)
    else:
        self._assign_extended_slice(start, stop, step, valueList)
