Get option/boolean
335228
public function getOption($key, $default = false)
    {
        if (!isset($this->args[$key])) {
            return $default;
        }
        $value = $this->args[$key];
        if (is_bool($value)) {
            return $value;
        }
        if (is_int($value)) {
            return (bool) $value;
        }
        if (is_string($value)) {
            $value = strtolower($value);
            if (static::booleanValue($value)) {
                return static::booleanValue($value);
            }
        }
        return $default;
    }
1279668
function getOption(opts) {
  return {
    tag: 'option',
    attrs: {
      disabled: opts.disabled,
      value: opts.value
    },
    children: opts.text,
    key: opts.value
  };
}
966156
def get_truetype(value):
    """"""
    if value in ["true", "True", "y", "Y", "yes"]:
        return True
    if value in ["false", "False", "n", "N", "no"]:
        return False
    if value.isdigit():
        return int(value)
    return str(value)
247126
public static boolean getBoolean(
    Object  value)
  {
    if (value == null)
    {
        return false;
    }
    
    if (value instanceof Boolean)
    {
        return ((Boolean) value).booleanValue();
    }

    return Boolean.valueOf(value.toString()).booleanValue();
  }
834118
public function getOption($option)
    {
        if (!empty($this->options->{$option})) {
            return $this->options->{$option};
        }

        return false;
    }
1364197
def get_boolean(self, input_string):
        

        if input_string in ('--write_roc', '--plot', '--compare'):

            # was the flag set?
            try:
                index = self.args.index(input_string) + 1
            except ValueError:
                # it wasn't, args are optional, so return the appropriate default
                return False

            # the flag was set, so return the True
            return True
571509
function bool(val) {
	assert(typeof val === 'boolean')
	var a = []
	a.op = 'bool'
	a.val = val
	return a
}
1054054
function opt(options, name, defaultValue){
    return options && options[name]!==undefined ? options[name] : defaultValue;
}
273922
def option(self, opt):
        '''
        
        '''
        if 'config.merge' in self.functions:
            return self.functions['config.merge'](opt, {}, omit_master=True)
        return self.opts.get(opt, {})
997819
def get(self, option, default=None):
        ''''''
        val = self[option]
        return (val is None and default) or val
560816
def get_as_boolean(self, key):
        
        value = self.get(key)
        return BooleanConverter.to_boolean(value)
550988
def get_option(self, name):
        
        self.__validate_option_name(name)
        return self.__options.get(name, None)
1347247
def from_bool(value):
    '''
    
    '''
    if value in ['on', 'yes']:
        value = True
    elif value in ['off', 'no']:
        value = False
    elif value == 'none':
        value = None

    return value
969524
def get_option(self, key):
        """"""
        return self._options.get(key, self._default_options[key])
43089
def optional(self):
        """"""
        value = self._schema.get("optional", False)
        if value is not False and value is not True:
            raise SchemaError(
                "optional value {0!r} is not a boolean".format(value))
        return value
1352263
def boolean(name=None):
    

    if name is None:
        name = 'Boolean Field'

    # Basic field
    field = pp.Regex('[YN]')

    # Parse action
    field.setParseAction(lambda b: _to_boolean(b[0]))

    # Name
    field.setName(name)

    return field
593162
public boolean getBooleanValue() throws IOException, SaneException {
    Preconditions.checkState(getValueType() == OptionValueType.BOOLEAN, "option is not a boolean");
    Preconditions.checkState(getValueCount() == 1, "option is a boolean array, not boolean");

    ControlOptionResult result = readOption();
    return SaneWord.fromBytes(result.getValue()).integerValue() != 0;
  }