Get the value and CAS ID associated with the key.  If a block is provided,
 value and CAS will be passed to the block.
327086
def get_cas(key)
      (value, cas) = perform(:cas, key)
      value = (!value || value == 'Not found') ? nil : value
      if block_given?
        yield value, cas
      else
        [value, cas]
      end
    end
407525
def __get_value_from_data(self, key, data):
        
        if key.isdigit():
            return data[int(key)]

        if key not in data:
            raise KeyError("Key not exists")

        return data.get(key)
1138827
def get_or_set(key, pool_options={}, &client_block)
      unless @_staged[key]
        @mutex.synchronize do
          @_staged[key] ||= [pool_options,client_block]
        end
      end
      get(key)
    end
748175
def ldSet(self, what, key, value):
    """"""
    if isListKey(key):
      # Make sure we keep the indexes consistent, insert missing_values
      # as necessary. We do remember the lists, so that we can remove
      # missing values after inserting all values from all selectors.
      self.lists[id(what)] = what
      ix = listKeyIndex(key)
      while len(what) <= ix:
        what.append(missing_value)
      what[ix] = value
    else:
      what[key] = value
    return value
1355788
def retrieve_data(key = '')
      key = key.to_s unless key.is_a? String
      data_array = @db.execute 'SELECT value FROM data WHERE key = ?', key
      Marshal.load(data_array[0][0]) unless data_array[0].nil?
    end
191908
def _get(self, key: bytes) -> Tuple[bytes, Tuple[Hash32]]:
        
        validate_is_bytes(key)
        validate_length(key, self._key_size)
        branch = []

        target_bit = 1 << (self.depth - 1)
        path = to_int(key)
        node_hash = self.root_hash
        # Append the sibling node to the branch
        # Iterate on the parent
        for _ in range(self.depth):
            node = self.db[node_hash]
            left, right = node[:32], node[32:]
            if path & target_bit:
                branch.append(left)
                node_hash = right
            else:
                branch.append(right)
                node_hash = left
            target_bit >>= 1

        # Value is the last hash in the chain
        # NOTE: Didn't do exception here for testing purposes
        return self.db[node_hash], tuple(branch)
1348984
public Object getValue(String key) {
        if (values == null) {
            return null;
        }
        return values.get(key);
    }
1091009
def get(self, key):
        ""
        if key in self.keys():
            return self[key]
        else:
            res = None
            for v in self.values():
                # This could get weird if the actual expected returned value
                # is None, especially in teh case of overlap. Any ambiguity
                # would be resolved by get_path(s).
                if hasattr(v, 'get'):
                    res = v.get(key)
                if res is not None:
                    break
            return res
793323
@SuppressWarnings("unchecked")
  public final <T> boolean cas(final String key, final int exp, GetsResponse<T> getsReponse,
      final CASOperation<T> operation)
      throws TimeoutException, InterruptedException, MemcachedException {

    return this.cas(key, exp, getsReponse, operation, this.transcoder);
  }
705484
def _get_val(record, keys):
    '''
    
    '''
    data = record
    for key in keys:
        if key in data:
            data = data[key]
        else:
            return None
    return data
320026
def _pk(self, obj):
        
        pk_values = tuple(getattr(obj, c.name)
                          for c in obj.__mapper__.primary_key)
        if len(pk_values) == 1:
            return pk_values[0]
        return pk_values
283805
def get_block_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_blocks if is_bytes else unidata.unicode_blocks

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['block'].get(negated, negated)
    else:
        value = unidata.unicode_alias['block'].get(value, value)

    return obj[value]
298316
def key_value(minion_id,
              pillar,  # pylint: disable=W0613
              pillar_key='redis_pillar'):
    '''
    
    '''
    # Identify key type and process as needed based on that type
    key_type = __salt__['redis.key_type'](minion_id)
    if key_type == 'string':
        return {pillar_key: __salt__['redis.get_key'](minion_id)}
    elif key_type == 'hash':
        return {pillar_key: __salt__['redis.hgetall'](minion_id)}
    elif key_type == 'list':
        list_size = __salt__['redis.llen'](minion_id)
        if not list_size:
            return {}
        return {pillar_key: __salt__['redis.lrange'](minion_id, 0,
                                                     list_size - 1)}
    elif key_type == 'set':
        return {pillar_key: __salt__['redis.smembers'](minion_id)}
    elif key_type == 'zset':
        set_size = __salt__['redis.zcard'](minion_id)
        if not set_size:
            return {}
        return {pillar_key: __salt__['redis.zrange'](minion_id, 0,
                                                     set_size - 1)}
    # Return nothing for unhandled types
    return {}
851684
private int getDataBlock(int ch) 
    {
        ch >>= SHIFT_;
        int indexValue = m_index_[ch];
        if (indexValue > 0) {
            return indexValue;
        }
    
        // allocate a new data block
        int newBlock = allocDataBlock();
        if (newBlock < 0) {
            // out of memory in the data array 
            return -1;
        }
        m_index_[ch] = newBlock;
    
        // copy-on-write for a block from a setRange()
        System.arraycopy(m_data_, Math.abs(indexValue), m_data_, newBlock,  
                         DATA_BLOCK_LENGTH << 2);
        return newBlock;
    }
855062
def get(self):
        
        section = {}
        if self.key is not None and self.value is not None:
            section[self.key] = self.value
        return section
1064982
protected final String getValue(final String key, final FieldCase ca) throws IdNotFoundException {
		ConstraintFactory f = generator.getConstraintFactory();
		String value = f.getModel(key).initValues(ca);
		if (value == null) {
			return "";
		}
		return value;
	}
174116
def deserialize_block(value):
        
        # Block id strings are stored under batch/txn ids for reference.
        # Only Blocks, not ids or Nones, should be returned by _get_block.
        block = Block()
        block.ParseFromString(value)
        return BlockWrapper(
            block=block)