Return value of given option.

        If option isn't found - return default_value (None by default).

        Args:
        - option: string with path to option with `:` separator
432382
def get(cls, option, default_value=None):
        
        config = cls.__get_instance()
        for name in option.split(':'):
            if not name:
                raise Exception('Incorrect value in path (maybe double `:` or empty path)')
            if name not in config:
                return default_value
            config = config[name]
        return deepcopy(config)
999523
def parse_options(options, arg_split:':', valuesep: '=', opt_default: true, keyed_sep: "/")
			return {} unless options
			parsed_options={}
			options=options.split(arg_split) unless options.is_a?(Enumerable)
			options.each do |optvalue|
				opt,value=DR::SimpleParser.parse_namevalue(optvalue,sep: valuesep, default: opt_default)
				parsed_options.set_keyed_value(opt,value, sep: keyed_sep)
			end
			return parsed_options
		end
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
434477
def config_default(option, default=None, type=None, section=cli.name):
    
    def f(option=option, default=default, type=type, section=section):
        config = read_config()
        if type is None and default is not None:
            # detect type from default.
            type = builtins.type(default)
        get_option = option_getter(type)
        try:
            return get_option(config, section, option)
        except (NoOptionError, NoSectionError):
            return default
    return f
921522
def get_value(self, index=None):
        

        if self.value is None:
            return self.default
        if index is not None:
            if self.value[index] is None:
                return self.default
            else:
                value = self.value[index]
        else:
            value = self.value

        return value
156594
def get(self, option, default=undefined, cast=undefined):
        
        if option in self.repository:
            value = self.repository.get(option)
        else:
            value = default

        if isinstance(value, Undefined):
            raise UndefinedValueError('%s option not found and default value was not defined.' % option)

        if isinstance(cast, Undefined):
            cast = lambda v: v  # nop
        elif cast is bool:
            cast = self._cast_boolean

        return cast(value)
375210
def get_default_value(self):
        
        val = self.show
        if not val:
            val = self.raw_value
        if not val:
            val = self.showname
        return val
351018
def value(self):
        
        if type(self._value) is None:
            self._value = bytearray()
        opt_type = defines.OptionRegistry.LIST[self._number].value_type
        if opt_type == defines.INTEGER:
            if byte_len(self._value) > 0:
                return int(self._value)
            else:
                return defines.OptionRegistry.LIST[self._number].default
        return self._value
647554
def force_option_value(self, opt_name, value):
        
        if not self.has_option(opt_name):
            raise ValueError("Unknow option name (%s)" % opt_name)
        self._options[opt_name].default = value # also change the value
        self._options[opt_name].hidden = True
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
550261
def get_option_path(self, name, section=None, vars=None, expect=None):
        
        val = self.get_option(name, section, vars, expect)
        return Path(val)
905870
def t_OPTION_AND_VALUE(self, t):
        '  # TODO(etingof) escape hash
        if t.value.endswith('\\'):
            t.lexer.multiline_newline_seen = False
            t.lexer.code_start = t.lexer.lexpos - len(t.value)
            t.lexer.begin('multiline')
            return

        lineno = len(re.findall(r'\r\n|\n|\r', t.value))

        option, value = self._parse_option_value(t.value)

        process, option, value = self._pre_parse_value(option, value)
        if not process:
            return

        if value.startswith('<<'):
            t.lexer.heredoc_anchor = value[2:].strip()
            t.lexer.heredoc_option = option
            t.lexer.code_start = t.lexer.lexpos
            t.lexer.begin('heredoc')
            return

        t.value = option, value

        t.lexer.lineno += lineno

        return t
1299818
def get_option_list(self, name, section=None, vars=None,
                        expect=None, separator=','):
        
        val = self.get_option(name, section, vars, expect)
        return val.split(separator) if val else []
382678
function getOption(opts, key, def) {
  var value = opts[key];
  return value === undefined ? def : value;
}
680970
def to_string_with_default(value, default_value):
        
        result = StringConverter.to_nullable_string(value)
        return result if result != None else default_value
594168
def _option(self):
        
        class Options(object):
            def __getitem__(_self, name):
                return self.getOption(name)

            def __setitem__(_self, name, value):
                self.setOption(name, value)

        return Options()
217539
def nested_option(default=False):
    

    def decorator(method):
        @wraps(method)
        def wrapper(*args, **kwargs):
            option = Option.nested.value
            kwargs[option] = kwargs.get(option, bool(default))
            return method(*args, **kwargs)

        return wrapper

    return decorator