Get value with optional default.
7170
def get(self, key, default=None):
        """"""
        try:
            key = self.get_key(key)
        except KeyError:
            return default
        return super(DatasetDict, self).get(key, default)
130841
def get(self, section, option, default = None):
  """"""
  if self.has_section(section):
   try:
    return self.config[section][option].get('value', None)
   except KeyError:
    if default == None:
     raise NoOptionError(option)
    else:
     return default
  else:
   raise NoSectionError(section)
111711
def get_value(prompt, default=None, hidden=False):
    '''
    '''
    _prompt = '%s : ' % prompt
    if default:
        _prompt = '%s [%s]: ' % (prompt, default)

    if hidden:
        ans = getpass(_prompt)
    else:
        ans = raw_input(_prompt)

    # If user hit Enter and there is a default value
    if not ans and default:
        ans = default
    return ans
460611
def get_default(name, value):
    """"""
    return os.environ.get('EXAMPLE_{}'.format(name.upper()), value)
109712
def GetValue(self):
    '''
    
    '''
    self.AssertInitialization('Optional')
    value = self._widget.GetValue()
    if not value or len(value) <= 0:
      return None
    return ' '.join(
      [self._action.option_strings[0],  # get the verbose copy if available
       value])
329869
def optional(self, value = None):
		

		# If there's no value, this is a getter
		if value is None:
			return this._optional

		# Else, set the flag
		else:
			this._optional = value and True or False
799377
def get_value(self, item, default=None):
        """"""
        try:
            return self[item].value
        except (AttributeError, KeyError) as e:
            return default
815468
def get_optional(self, key: str,
                     default: Optional[Any] = None) -> Optional[Any]:
        
        return self.state.get(key, default)
176305
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return OptionNumber(key)
        if key not in OptionNumber._member_map_:
            extend_enum(OptionNumber, key, default)
        return OptionNumber[key]
229024
def get(self, key, default=None):
        
        try:
            val = self[key]
        except KeyError:
            val = default
        return val
846596
def getValue(self, prop, default=None):
        """"""

        f = self.props.get(prop, None)
        if not f:
            return default
        if isinstance(f, Feature):
            return f.getValue()
        if isinstance(f, tuple):
            # if f[0].getValue() == f[1].getValue():
            #    return f[0].getValue()
            # Miguel: para poder probar
            if f[0]:
                return f[0].getValue()
            elif f[1]:
                return f[1].getValue()
            raise Exception("Getting value from a property with a constrain")
        return f
1069118
def get_option(self, name, default=None):
        
        if self.options is None:
            return default
        return self.options.get(name, default)
703800
def get(expr, key, default=None):
    
    return ops.MapValueOrDefaultForKey(expr, key, default).to_expr()
483924
def get_default_value(self, check):
        
        fun_name, fun_args, fun_kwargs, default = self._parse_with_caching(check)
        if default is None:
            raise KeyError('Check "%s" has no default value.' % check)
        value = self._handle_none(default)
        if value is None:
            return value
        return self._check_value(value, fun_name, fun_args, fun_kwargs)
1207094
def get(self, value, default=None):
        """"""
        path = value if isinstance(value, Path) else Path(str(value))
        subtree = self
        for part in path.parts:
            try:
                subtree = subtree[part]
            except KeyError:
                return default
        return subtree
924859
@Override
    public double getWithDefault(int idx, double defaultVal) {
		int i = Arrays.binarySearch(indices, 0, used, idx);
		if (i < 0) {
			return defaultVal;
		}
		return values[i];
	}
612263
public int get(int key, int defaultValue) {
    int index = getKeyIndex(key);
    if (index >= 0) {
      return values[index];
    } else {
      return defaultValue;
    }
  }