set the value at index.
 Lists start from index 0
324762
def set( index , value)
      raise "Only positive indexes #{index}" if index < 0
      if index >= get_length
        grow_to(index + 1)
      end
      if index >= data_length
        ensure_next
        next_list.set( index - data_length , value)
      else
        set_internal_word( index + self.class.type_length, value)
      end
    end
1061906
def index(self, value):
        

        for i, x in enumerate(self):
            if x == value:
                return i

        raise ValueError("{} is not in list".format(value))
669310
public void setAll(int index, ByteArray items) {
    rangeCheck(index, index + items.size);
    for (int i = index, j = 0; j < items.size; i++, j++) {
      elements[i] = items.elements[j];
    }
  }
551173
def setIndexes(self, indexes):
        
        self.__indexes = {}
        for name, index in indexes.items():
            self.__indexes[name] = index
            index.setSchema(self)
871915
def add_index(self, values, name=None):
        ''
        if len(values) != len(set(values)):
            raise ValueError('Values in the new index are not unique')

        d = self.indices
        if len(values) != len(self) and len(values) and d:
            raise ValueError('Length of values in added index (%s) does not match '
                             'length of existing items (%s)' % (len(values), len(self)))

        if name is None:
            name = 'index_' + str(len(d)+1)
            name = get_unique_name(name, d)
        else:
            MI_check_index_name(name)
            if name in d:
                raise ValueError('Duplicate index name: %s' % (name,))

        if len(d) == 0:
            items = [(v,) for v in values]
        else:
            items = [i+(v,) for i, v in zip(self.items(), values)]

        names = force_list(d.keys()) + [name]

        self.clear(True)
        _MI_init(self, items, names)
783390
def lset(self, key, index, value):
        
        if not isinstance(index, int):
            raise TypeError("index argument must be int")
        return self.execute(b'LSET', key, index, value)
670146
def set(self, x):
        
        for name, value in iter(x.items()):
            if hasattr(value, "ndim"):
                if self[name].value.ndim < value.ndim:
                    self[name].value.itemset(value.squeeze())
                else:
                    self[name].value = value
            else:
                self[name].value.itemset(value)
234037
public void set(long index, T value)
    {
        array[segment(index)][offset(index)] = value;
    }
905658
public void set(long index) throws IOException {
        long pos = index >> 3;
        try {
            lock().acquireUpgradableLock();
            int value = mFile.read(pos);
            int newValue;
            if (value <= 0) {
                newValue = (0x00000080 >> (index & 7));
            }
            else {
                newValue = value | (0x00000080 >> (index & 7));
            }
            if (newValue != value) {
                mFile.write(pos, newValue);
            }
        }
        catch (InterruptedException e) {
            throw new InterruptedIOException();
        }
        finally {
            lock().releaseLock();
        }
    }
1202486
function lset(index, value) {
  if(index < 0) index = this._data.length + index;
  // command should validate the index
  if(index < 0 || index >= this._data.length) return null;
  this._data[index] = value;
}
1235388
public void setStart(int index, Date value)
   {
      set(selectField(ResourceFieldLists.CUSTOM_START, index), value);
   }
222060
function(list, index) {
            if ((index.type !== "Dimension") ||
                 !index.unit.isEmpty())
                    return atKey(list, index);

            list = isArray(list.value)
                ? list.value : [list];
            return list[index.value - 1];
        }
42147
def index(self, sub, start=None, end=None):
        
        return self.value_no_colors.index(sub, start, end)
697206
public void set(int index, boolean value)
    throws ArrayIndexOutOfBoundsException {
        if (index < 0 || index >= length) {
            throw new ArrayIndexOutOfBoundsException(Integer.toString(index));
        }
        int idx = subscript(index);
        int bit = position(index);

        if (value) {
            repn[idx] |= bit;
        } else {
            repn[idx] &= ~bit;
        }
    }
474278
public void setStart(int index, Date value)
   {
      set(selectField(AssignmentFieldLists.CUSTOM_START, index), value);
   }
1330427
private void init( List<T> list ) {
		this.list = list;
		indexes = new int[ list.size() ];
		counters = new int[ list.size() ];

		for( int i = 0; i < indexes.length ; i++ ) {
			counters[i] = indexes[i] = i;
		}

		total = 1;
		for( int i = 2; i <= indexes.length ; i++ ) {
			total *= i;
		}

		permutation = 0;
	}
52709
def pop(self, index=-1):
		""""""
		value = self._list.pop(index)
		del self._dict[value]
		return value