If option_value is not None, then return it. Otherwise get the result from 
    input.
515199
def get_input(prompt, default=None, choices=None, option_value=None):
    
    if option_value is not None:
        return option_value
    
    choices = choices or []
    while 1:
        r = input(prompt+' ').strip()
        if not r and default is not None:
            return default
        if choices:
            if r not in choices:
                r = None
            else:
                break
        else:
            break
    return r
1082308
def value(self):
        
        if self.opts['int']:
            return int(self.val)
        else:
            return float(self.val)
227297
def GetOptionBool(self, section, option):
    
    return (not self.config.has_option(section, option)
            or self.config.getboolean(section, option))
825873
def get_or(self, default: T) -> T:
        
        return default if self.value is None else self.value
101990
def _set_option(self, name, value, allow_clear=False):
        """"""
        if not allow_clear:
            # Prevent clears if value was set
            try:
                current_value = self._get_option(name)
                if value is None and current_value is not None:
                    return
            except AttributeError:
                pass

        self.opts[name] = value
270456
public static String getOptionValue(String[] args, String optionName) {
		String opt = "-" + optionName + "=";
		for (String arg : args) {
			if (arg.startsWith(opt))
				return arg.substring(opt.length());
		}
		return null;
	}
550988
def get_option(self, name):
        
        self.__validate_option_name(name)
        return self.__options.get(name, None)
390782
def get_value(self):
        """"""
        if self.value is not_computed:
            self.value = self.value_provider()
            if self.value is not_computed:
                return None
        return self.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
415015
def value(self):
        """"""
        dtype = lib.get_data_type(self._data)
        dvalue = lib.get_data_value(self._data)

        if dvalue == ffi.NULL:
            return None

        return self.python_value(dtype, dvalue)
594015
def get(self, option, default=undefined, cast=undefined):
        

        # We can't avoid __contains__ because value may be empty.
        if option in os.environ:
            value = os.environ[option]
        elif option in self.repository:
            value = self.repository[option]
        else:
            if isinstance(default, Undefined):
                raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))

            value = default

        if isinstance(cast, Undefined):
            cast = self._cast_do_nothing
        elif cast is bool:
            cast = self._cast_boolean

        return cast(value)
870000
def _check_opts(self):
        
        for opt in self.opts.keys():
            if opt not in self.__dict__:
                raise Exception(f"Unsupported option: {opt}")
299206
def get_option_boolean(self, name, section=None, vars=None, expect=None):
        
        val = self.get_option(name, section, vars, expect)
        val = val.lower() if val else 'false'
        return val == 'true'
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
382678
function getOption(opts, key, def) {
  var value = opts[key];
  return value === undefined ? def : value;
}
1228508
def getValue(self):
    '''
    
    '''
    dropdown_value = self.widget.GetValue()
    if not str(dropdown_value).isdigit():
      return ''
    arg = str(self.option_string).replace('-', '')
    repeated_args = arg * int(dropdown_value)
    return '-' + repeated_args
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