

@classdef.method('slice!')
@check_frozen()
def method_slice_i(self, space, w_idx, w_count=None):
    (start, end, as_range, nil) = space.subscript_access(self.length(), w_idx, w_count=w_count)
    if nil:
        return space.w_nil
    elif as_range:
        start = min(max(start, 0), self.length())
        end = min(max(end, 0), self.length())
        delta = (end - start)
        assert (delta >= 0)
        w_items = self.items_w[start:(start + delta)]
        del self.items_w[start:(start + delta)]
        return space.newarray(w_items)
    else:
        w_item = self.items_w[start]
        del self.items_w[start]
        return w_item

dataset/ETHPy150Open topazproject/topaz/topaz/objects/arrayobject.py W_ArrayObject.method_slice_i/original