Get an element of the collection.

        :param key: The index of the element
        :type key: mixed

        :param default: The default value to return
        :type default: mixed

        :rtype: mixed
510246
def get(self, key, default=None):
        
        try:
            return self.items[key]
        except IndexError:
            return value(default)
613210
def get_int(self, key, default=None):
        
        value = self.get(key, default)
        return None if value is None else int(value)
924011
def search(self, key, default=None):
        
        self._find_lt(key)
        node = self._path[0][2]
        if node is self._tail or key < node[0]:
            return default
        return node[1]
1273033
def get(self, key, default=_NoValue):
        
        self._checkType(key, "key")
        if default is _NoValue:
            return self._jconf.get(key)
        else:
            if default is not None:
                self._checkType(default, "default")
            return self._jconf.get(key, default)
52608
def get_float(self, key, default=None):
        
        value = self.get(key, default)
        return None if value is None else float(value)
594224
def get(config, key, default=None):
        

        if hasattr(config, key):
            return getattr(config, key)
        else:
            return default
368234
def get(self, key, default=miss):
        """"""
        if key not in self._dict:
            return default

        # invokes __getitem__, which updates the item
        return self[key]
1096346
def get(key, default=None):
    
    data = get_form() or get_query_string()
    return data.get(key, 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
278775
public Json.Object getObject(String key, Json.Object default_) {
    Object o = get(key);
    return (o instanceof JsonObject) ? (JsonObject)o : default_;
  }
666374
def _collection(self, key):
    ''''''
    collection = str(key.path)
    if not collection in self._items:
      self._items[collection] = dict()
    return self._items[collection]
721635
def value(self, key, default=None):
        
        parts = nativestring(key).split('/')
        curr = self._xstack[-1]
        for part in parts[:-1]:
            next = curr.find(part)
            if next is None:
                next = ElementTree.SubElement(curr, part)
            curr = next
        
        xval = curr.find(parts[-1])
        if xval is None:
            return default
        
        return self.restoreValue(xval)
561482
def get_key(self, key):
        
        return self.__mapping.get(self.type(key), self.__getitem__)(key)
778156
public Object get(Object key) {
        Object val = super.get(key);
        if (val == null && key instanceof Option) {
            val = ((Option)key).defaultValue;
        }

        return val;
    }
815468
def get_optional(self, key: str,
                     default: Optional[Any] = None) -> Optional[Any]:
        
        return self.state.get(key, default)
51464
def get(self, key, default=None):
        
        try:
            result = self._loads(self._client.hget(self.key_prefix, key))
            assert result is not None
            return result
        except (AssertionError, KeyError):
            return default or self._default
179780
def get(self, key, default=None, type_=None):
        
        try:
            rv = self[key]
        except KeyError:
            return default
        if type_ is not None:
            try:
                rv = type_(rv)
            except ValueError:
                rv = default
        return rv