def _set_slice(self, index, values):
        "Assign values to a slice of the object"
        try:
            iter(values)
        except __HOLE__:
            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)

        # CAREFUL: index.step and step are not the same!
        # step will never be None
        if index.step is None:
            self._assign_simple_slice(start, stop, valueList)
        else:
            self._assign_extended_slice(start, stop, step, valueList)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/geos/mutable_list.py/ListMixin._set_slice