Try to get the item at index position in iterable after iterate on
    iterable items.

    :param iterable: object which provides the method __getitem__ or __iter__.
    :param int index: item position to get.
421956
def itemat(iterable, index):
    

    result = None

    handleindex = True

    if isinstance(iterable, dict):
        handleindex = False

    else:
        try:
            result = iterable[index]
        except TypeError:
            handleindex = False

    if not handleindex:
        iterator = iter(iterable)

        if index < 0:  # ensure index is positive
            index += len(iterable)

        while index >= 0:
            try:
                value = next(iterator)

            except StopIteration:
                raise IndexError(
                    "{0} index {1} out of range".format(
                        iterable.__class__, index
                    )
                )

            else:
                if index == 0:
                    result = value
                    break
                index -= 1

    return result
392426
public int get(int index) throws NoSuchElementException {
        if (tc.isEntryEnabled())
            SibTr.entry(tc, "get");

        int retValue = 0;

        // We need to work out which array this item will be in
        int arrayNumber = index / arraySize;

        // Bounds check
        if ((index + 1) > elements) {
            throw new NoSuchElementException();
        } else if (index < 0) {
            throw new NoSuchElementException();
        }
        // Is it in the current array?
        else if (allArrays.size() == arrayNumber) {
            retValue = current[index - (arrayNumber * arraySize)];
        }
        // Else get the array from the Vector and
        // return the value
        else {
            int[] tempArray = (int[]) allArrays.get(arrayNumber);
            retValue = tempArray[index - (arrayNumber * arraySize)];
        }

        if (tc.isDebugEnabled())
            SibTr.debug(tc, "rc=", retValue);
        if (tc.isEntryEnabled())
            SibTr.exit(tc, "get");

        return retValue;
    }
1095967
def itemFromIndex(self, index):
        
        sourceIndex = self.mapToSource(index)
        return self.sourceModel().itemFromIndex(sourceIndex)
1091617
def get_iterarg(self, name, index):
    
    plural = self._profile.iterargs[name]
    return self._values[plural][index]
510246
def get(self, key, default=None):
        
        try:
            return self.items[key]
        except IndexError:
            return value(default)
617622
public T get(int index) throws IndexOutOfBoundsException {
        if (index >= mSize || index < 0) {
            throw new IndexOutOfBoundsException("Asked to get item at " + index + " but size is "
                    + mSize);
        }
        return mData[index];
    }
330730
def getIndexedValue(self, index):
        
        actions = self._actions

        if (type (actions) is list):
            dict = actions[index]
        else:
            dict = actions
        return dict.get('value', 'NoValue')
783385
def popitem(self):
        
        try:
            value = next(iter(self))
            key = value[self._keycol]
        except StopIteration:
            raise KeyError
        del self[key]
        return key, value
838809
def get( index )
      raise "Only positive indexes, #{index}" if index < 0
      if index >= data_length
        return nil unless next_list
        return next_list.get( index - data_length)
      else
        ret = nil
        if(index < get_length)
          ret = get_internal_word(index + self.class.type_length )
        end
        return ret
      end
    end
1280355
async def item(source, index):
    
    # Prepare
    if index >= 0:
        source = skip.raw(source, index)
    else:
        source = takelast(source, abs(index))
    async with streamcontext(source) as streamer:
        # Get first item
        try:
            result = await anext(streamer)
        except StopAsyncIteration:
            raise IndexError("Index out of range")
        # Check length
        if index < 0:
            count = 1
            async for _ in streamer:
                count += 1
            if count != abs(index):
                raise IndexError("Index out of range")
        # Yield result
        yield result
265921
public Object get(int index)
	{
		if (value == null)
			return value;
		if (value != null && !(value instanceof Object[]))
			throw new IllegalStateException("Trying to access indexed element of non-array Parameter");

		Object[] v = (Object[]) value;
		if (index < 0 || index >= v.length)
			return null;

		return Array.get(value, index);
	}
704790
def _get_item_position(self, idx):
        """"""
        start = 0 if idx == 0 else self._index[idx - 1] + 1
        end = self._index[idx]
        return start, end
1312757
function(index)
  {
    //Check the index value
    if(index >= keys.length)
    {
      //Do the callback and exit
      return cb(null);
    }
    else
    {
      //Get the key
      var key = (is_array) ? index : keys[index];

      //Get the value
      var value = list[key];

      //Call the provided method with the element of the array
      return fn.call(null, key, value, function(error)
      {
        //Check the error
        if(error)
        {
          //Do the callback with the provided error
          return cb(error);
        }
        else
        {
          //Continue with the next item on the list
          return each_async(index + 1);
        }
      });
    }
  }
1207384
def get(self, key, index=None):
        
        records = self.get_multi([key], index=index)

        try:
            return records[0][1]  # return the value from the key/value tuple
        except IndexError:
            return None
735510
def peek_at(iterable: Iterable[T]) -> Tuple[T, Iterator[T]]:
    
    gen = iter(iterable)
    peek = next(gen)
    return peek, itertools.chain([peek], gen)
583757
def get(self, idx, default=''):
        ''''''
        # if the index is beyond the length of the list, return ''
        if isinstance(idx, int) and (idx >= len(self) or idx < -1 * len(self)):
            return default
        # else do the regular list function (for int, slice types, etc.)
        return super().__getitem__(idx)
295107
def getItem(self, index, altItem=None):
        
        if index.isValid():
            item = index.internalPointer()
            if item:
                return item

        #return altItem if altItem is not None else self.invisibleRootItem # TODO: remove
        return altItem