def set(self, index, value, traverser=None):
        if index.isdigit():
            try:
                i_index = min(int(index), 100000)
                # Ignore floating point indexes
                if i_index != float(index) or i_index < 0:
                    return super(JSArray, self).set(index, value, traverser)
                if len(self.elements) <= i_index:
                    for i in xrange(i_index - len(self.elements) + 1):
                        self.elements.append(None)
                self.elements[i_index] = value
                return value
            except ValueError:
                return super(JSArray, self).set(index, value, traverser)
        else:
            return super(JSArray, self).set(index, value, traverser)
dataset/ETHPy150Open mozilla/app-validator/appvalidator/testcases/javascript/jstypes.py/JSArray.set/original