Remove specified key and return the corresponding value.

        :keyword default: If key is not found, ``default`` is returned if given,
            otherwise :exc:`KeyError` is raised.
165780
def pop(self, key, *args, **kwargs):
        
        try:
            val = self[key]
        except KeyError:
            if len(args):
                return args[0]
            if "default" in kwargs:
                return kwargs["default"]
            raise

        try:
            del(self[key])
        except KeyError:
            pass

        return val
1342667
def get_keyword(self, kwd, *args):
        """"""
        try:
            kwds = self.get_header()
            return kwds[kwd]
        except KeyError:
            # return a default if there is one
            if len(args) > 0:
                return args[0]
            raise KeyError(kwd)
594224
def get(config, key, default=None):
        

        if hasattr(config, key):
            return getattr(config, key)
        else:
            return default
57151
def pop(self, key, default=None):
        ""
        if not isinstance(key, tuple): key = (key,)
        return self.data.pop(key, default)
491021
def pop(self, key, default=None):
        
        return self._dictionary.pop(key.lower(), default)
1285813
def getkey(mapping, value, default=None, use_id=False):
    '''
    '''
    if use_id:
        for key, val in mapping.items():
            if val is value:
                return key
    else:
        for key, val in mapping.items():
            if val == value:
                return key
    return default
400818
def setdefault(self, key, default=None):
        
        if key in self:
            return self[key]
        else:
            self._setitem(key, default)
            self._list_add(key)
            return default
703800
def get(expr, key, default=None):
    
    return ops.MapValueOrDefaultForKey(expr, key, default).to_expr()
1095251
def value(self, key, type_=None):
        
        if type_ is None:
            default = self._default_value(key)
            val = self._value(key, default)
            if type(val) == type(default):
                return val
            else:
                return self._convert_value(val, type(default))
        else:
            val = self._value(key, None)
            if val is None:
                return None
            return self._convert_value(val, type_)
1194306
def pop(self, key, default=_NotGiven):
        
        if key in self:
            self._list_remove(key)
            return self._pop(key)
        else:
            if default is _NotGiven:
                raise KeyError(key)
            else:
                return default
521027
def get_str(self, key, default=None):
        
        if key:
            for provider in self.providers:
                value = provider.get_str(key)
                if value is not None:
                    return value

        return default
490997
def pop(self, key, default=_marker):
        
        try:
            popped = self[key]
            del self[key]
            return popped
        except KeyError:
            if default == _marker:
                raise
            return default
379314
def pop(self, key, default):
        """"""
        with self._lock:
            return self._dict.pop(key, default)
1040537
def get_key(cls, k, default=None):
        
        k = cls.__name__ + "__" + k
        if k in session:
            return session[k]
        else:
            return default
409340
def pop(self, key, default=NONE):
        
        if key in self:
            self._list_remove(key)
            return self._pop(key)
        else:
            if default is NONE:
                raise KeyError(key)
            else:
                return default
907169
def pop(self, key=util_const.NoParam, default=util_const.NoParam):
        
        # Dictionary pop if key is specified
        if key is not util_const.NoParam:
            if default is util_const.NoParam:
                return (key, self._dict.pop(key))
            else:
                return (key, self._dict.pop(key, default))
        # Otherwise do a heap pop
        try:
            # Ammortized O(1)
            _heap = self._heap
            _dict = self._dict
            val, key = self._heappop(_heap)
            # Remove items marked for lazy deletion as they are encountered
            while key not in _dict or _dict[key] != val:
                val, key = self._heappop(_heap)
        except IndexError:
            if len(_heap) == 0:
                raise IndexError('queue is empty')
            else:
                raise
        del _dict[key]
        return key, val
7334
def get_bool(self, key, default=None):
        
        value = self.get_str(key)
        if value is not None:
            return to_boolean(value)

        return default