Gets the current setting with no parameters, sets it if a boolean is passed in

        :param default: the value to set
        :return: the current value, or new value if default is set to True or False
965785
def default_to_hashed_rows(self, default=None):
        
        if default is not None:
            self._default_to_hashed_rows = (default is True)

        return self._default_to_hashed_rows
30205
def get_default(self):
        
        definfo = functionutils.DefinitionInfo.read(self._function)
        for arg, default in definfo.args_with_defaults:
            if self.argname == arg:
                return default
        return None
205032
def default(self):
        
        if isinstance(self.__default, (str, unicode)):
            return self.valueFromString(self.__default)
        else:
            return self.__default
177974
def __parameter_default(self, field):
    
    if field.default:
      if isinstance(field, messages.EnumField):
        return field.default.name
      elif isinstance(field, messages.BooleanField):
        # The Python standard representation of a boolean value causes problems
        # when generating client code.
        return 'true' if field.default else 'false'
      else:
        return str(field.default)
953883
def set_default(self, default):  # type: (typing.Any) -> None
        
        if default is not None and len(default) > 1 and default[0] == '"' and default[-1] == '"':
            default = default[1:-1]
        self.defaultValue = default
438217
def setDefault(self, key, value):
        
        if value is None:
            self._defaults.pop(key, None)
        else:
            self._defaults[key] = value
746623
def default_value(self):
        
        if callable(self.default) and self.call_default:
            return self.default()
        return self.default
1048106
def is_true(key, default=False):
    
    value = get(key, default)
    if isinstance(value, list):
        value = value[0]
    if isinstance(value, bool):
        return value
    if value is default:
        return default
    return value.lower() in TRUE_VALUES
594224
def get(config, key, default=None):
        

        if hasattr(config, key):
            return getattr(config, key)
        else:
            return default
1323834
def get(name, import_str=False):
    
    value = None
    default_value = getattr(default_settings, name)

    try:
        value = getattr(settings, name)
    except AttributeError:
        if name in default_settings.required_attrs:
            raise Exception('You must set ' + name + ' in your settings.')

    if isinstance(default_value, dict) and value:
        default_value.update(value)
        value = default_value
    else:
        if value is None:
            value = default_value
        value = import_from_str(value) if import_str else value

    return value
390672
protected function get_bool_value(
		/** @noinspection PhpUnusedParameterInspection */
		$value, $default, $setting
	) {
		if ( is_bool( $value ) ) {
			return $value;
		}
		if ( 'true' === $value ) {
			return true;
		}
		if ( 'false' === $value ) {
			return false;
		}
		if ( isset( $value ) && (string) $value !== '' ) {
			return ! empty( $value );
		}

		return ! empty( $default );
	}
47879
def setting(self, setting_name, default=None):  # type: (str) -> Any
        
        keys = setting_name.split(".")

        config = self._content
        for key in keys:
            if key not in config:
                return default

            config = config[key]

        return config
390581
def get_value(self, default=None):
        
        if default is None:
            default = ''

        try:
            text = self.currentText()

        except ValueError:
            lg.debug('Cannot convert "' + str(text) + '" to list. ' +
                     'Using default ' + str(default))
            text = default
            self.set_value(text)

        return text
375210
def get_default_value(self):
        
        val = self.show
        if not val:
            val = self.raw_value
        if not val:
            val = self.showname
        return val
117900
def get_bool(self, key, default=None):
        
        v = self.get(key, default)
        if v != default:
            v = v.strip().lower()
            if v == 'true':
                v = True
            elif v == 'false':
                v = False
            elif default is None:
                raise RuntimeError("invalid bool string: %s" % v)
            else:
                v = default
        return v
350900
def value_or_default(self, value):
        '''  '''
        if value is None:
            if callable(self.default):
                return self.default()
            else:
                return self.default

        return value
444099
public boolean getBoolean(String key, boolean defaultValue) {
    Object value = get(key);
    if (value instanceof Boolean) {
      return (boolean) value;
    } else if (value instanceof String) {
      return Boolean.valueOf((String) value);
    }
    return defaultValue;
  }