If dictionary contains _key_ return the associated value,
        otherwise return _alt_.
182756
def get(self, key, alt=None):
        
        with self.lock:
            if key in self:
                return self.getitem(key)

            else:
                return alt
1249433
def _dict_lookup(cls, item, **kwargs):
        '''
        
        '''
        log.debug('item == %s', item)
        value_lookup = kwargs.get('value_lookup', False)
        if 'lookup' in kwargs:
            for k, v in six.iteritems(kwargs['lookup']):
                if value_lookup:
                    if six.text_type(v).lower() == six.text_type(item).lower():
                        log.debug('returning key %s', k)
                        return k
                else:
                    if six.text_type(k).lower() == six.text_type(item).lower():
                        log.debug('returning value %s', v)
                        return v
        return 'Invalid Value'
1335367
def _has(self, key, exact=0):
        """"""
        if not exact:
            key = self.getfullkey(key,new=1)
        return key in self.data
984923
def get_item_key(self, item):
        """"""
        try:
            ret = item[item['key']]
        except KeyError:
            logger.error("No 'key' available in {}".format(item))
        if isinstance(ret, list):
            return ret[0]
        else:
            return ret
1341973
def dict_find_key(dd, value):
    
    key = next(key for key, val in dd.items() if val == value)
    return key
655370
def check_key(self, key: str) -> bool:
        
        keys = self.get_keys()
        return key in keys
100703
def contains(self, desired):
        ''''''
        field = self.__field
        def aFilter(testDictionary):
            return (desired in testDictionary[field])
        return aFilter
1050134
def get(self, item, not_found_value=None):
        ""

        if item in self.keys:
            return self.__data[item]
        else:
            return not_found_value
930363
def ldContains(self, what, key):
    
    if isListKey(key):
      i = listKeyIndex(key)
      return i < len(what) and what[i] != missing_value
    else:
      return key in what and what[key] != missing_value
819462
def get_dict_key(data, key):
    '''  '''

    if isinstance(data, Mapping):
        if key in data:
            yield data[key]
        for key_data in data.values():
            for found in get_dict_key(key_data, key):
                yield found
189989
def get(self, key, default_val=None, require_value=False):
        
        val = dict.get(self, key, default_val)
        if val is None and require_value:
            raise KeyError('key "%s" not found' % key)
        if isinstance(val, dict):
            return AttributeDict(val)
        return val
633411
def _get_key(key, scopes):
    """"""

    # If the key is a dot
    if key == '.':
        # Then just return the current scope
        return scopes[0]

    # Loop through the scopes
    for scope in scopes:
        try:
            # For every dot seperated key
            for child in key.split('.'):
                # Move into the scope
                try:
                    # Try subscripting (Normal dictionaries)
                    scope = scope[child]
                except (TypeError, AttributeError):
                    try:
                        # Try the dictionary (Complex types)
                        scope = scope.__dict__[child]
                    except (TypeError, AttributeError):
                        # Try as a list
                        scope = scope[int(child)]

            # Return an empty string if falsy, with two exceptions
            # 0 should return 0, and False should return False
            # While using is for this check is undefined it works and is fast
            if scope is 0:  # noqa: F632
                return 0
            if scope is False:
                return False

            try:
                # This allows for custom falsy data types
                # https://github.com/noahmorrison/chevron/issues/35
                if scope._CHEVRON_return_scope_when_falsy:
                    return scope
            except AttributeError:
                return scope or ''
        except (AttributeError, KeyError, IndexError, ValueError):
            # We couldn't find the key in the current scope
            # We'll try again on the next pass
            pass

    # We couldn't find the key in any of the scopes
    return ''
1196868
def _iget(key, lookup_dict):
    
    for k, v in lookup_dict.items():
        if k.lower() == key.lower():
            return v
    return None
1319277
def get(self, key, default=None):
        """"""
        for k, v in self:
            if k == key:
                return v
        return default
275458
def get_value(kv, key, value = None):
    """"""
    res = []
    for k, v in kv:
        if k == key:
            value = v
        else:
            res.append([k, v])
    return value, res
1064149
def get (self, key, def_val=None):
        """"""
        assert isinstance(key, basestring)
        return dict.get(self, key.lower(), def_val)
1111490
def is_set(self, key):
        
        path = key.split(self._key_delimiter)

        lower_case_key = key.lower()
        val = self._find(lower_case_key)

        if val is None:
            source = self._find(path[0].lower())
            if source is not None and isinstance(source, dict):
                val = self._search_dict(source, path[1::])

        return val is not None