

@classdef.method('[]=')
@check_frozen()
def method_subscript_assign(self, space, w_idx, w_count_or_obj, w_obj=None):
    w_count = None
    if w_obj:
        w_count = w_count_or_obj
    else:
        w_obj = w_count_or_obj
    (start, end, as_range, _) = space.subscript_access(self.length(), w_idx, w_count=w_count)
    if (w_count and (end < start)):
        raise space.error(space.w_IndexError, ('negative length (%d)' % (end - start)))
    elif (start < 0):
        raise space.error(space.w_IndexError, ('index %d too small for array; minimum: %d' % ((start - self.length()), (- self.length()))))
    elif start:
        w_converted = space.convert_type(w_obj, space.w_array, 'to_ary', raise_error=False)
        if (w_converted is space.w_nil):
            rep_w = [w_obj]
        else:
            rep_w = space.listview(w_converted)
        self._subscript_assign_range(space, start, end, rep_w)
    elif (start >= self.length()):
        self.items_w += ([space.w_nil] * ((start - self.length()) + 1))
        self.items_w[start] = w_obj
    else:
        self.items_w[start] = w_obj
    return w_obj

dataset/ETHPy150Open topazproject/topaz/topaz/objects/arrayobject.py W_ArrayObject.method_subscript_assign/VarMisuse@163/245 `as_range`->`start`