Return the option value.

        :return: the option value in the correct format depending on the option
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
913598
def value(self, value):
        
        opt_type = defines.OptionRegistry.LIST[self._number].value_type
        if opt_type == defines.INTEGER:
            if type(value) is not int:
                value = int(value)
            if byte_len(value) == 0:
                value = 0
        elif opt_type == defines.STRING:
            if type(value) is not str:
                value = str(value)
        elif opt_type == defines.OPAQUE:
            if type(value) is bytes:
                pass
            else:
                if value is not None:
                    value = bytes(value, "utf-8")

        self._value = value
376102
def get_option_float(self, name, section=None, vars=None, expect=None):
        """"""
        val = self.get_option(name, section, vars, expect)
        if val:
            return float(val)
1259346
def raw_value(self) -> typing.Optional[object]:
        
        raw_value = self._from_environ()
        if raw_value is None:
            raw_value = self._from_config_file()
        if raw_value is None:
            raw_value = self._from_default()
        return raw_value
413334
def options(self, options=None):
		

		# If opts aren't set, this is a getter
		if options is None:
			return self._options

		# If the options are not a list
		if not isinstance(options, (list, tuple)):
			raise ValueError('__options__')

		# If the type is not one that can have options
		if self._type not in ['base64', 'date', 'datetime', 'decimal', 'float', \
								'int', 'ip', 'md5', 'price', 'string', 'time', \
								'timestamp', 'uint', 'uuid']:
			raise TypeError('can not set __options__ for ' + self._type)

		# Init the list of options to be saved
		lOpts = []

		# Go through each item and make sure it's unique and valid
		for i in range(len(options)):

			# Convert the value based on the type
			# If the type is a string one that we can validate
			if self._type in ['base64', 'date', 'datetime', 'ip', 'md5', 'time', 'uuid']:

				# If the value is not a string or doesn't match its regex, raise
				# 	an error
				if not isinstance(options[i], basestring) \
					or not _typeToRegex[self._type].match(options[i]):
					raise ValueError('__options__[%d]' % i)

			# Else if it's decimal
			elif self._type == 'decimal':

				# If it's a Decimal
				if isinstance(options[i], Decimal):
					pass

				# Else if we can't conver it
				else:
					try: options[i] = Decimal(options[i])
					except ValueError:
						raise ValueError('__options__[%d]' % i)

			# Else if it's a float
			elif self._type == 'float':

				try:
					options[i] = float(options[i])
				except ValueError:
					raise ValueError('__options__[%d]' % i)

			# Else if it's an integer
			elif self._type in ['int', 'timestamp', 'uint']:

				# If we don't already have an int
				if not isinstance(options[i], (int, long)):

					# And we don't have a string
					if not isinstance(options[i], basestring):
						raise ValueError('__options__[%d]' % i)

					try:
						options[i] = int(options[i], 0)
					except ValueError:
						raise ValueError('__options__[%d]' % i)

				# If the type is unsigned and negative, raise an error
				if self._type in ['timestamp', 'uint'] and options[i] < 0:
					raise ValueError('__options__[' + str(i) + ']')

			# Else if it's a price
			elif self._type == 'price':

				# If it's a Decimal
				if isinstance(options[i], Decimal):
					pass

				# Else if it's not a valid price representation
				elif not isinstance(options[i], basestring) or not _typeToRegex['price'].match(options[i]):
					raise ValueError('__options__[%d]' % i)

				# Store it as a Decimal
				options[i] = Decimal(options[i])

			# Else if the type is a string
			elif self._type == 'string':

				# If the value is not a string
				if not isinstance(options[i], basestring):

					# If the value can't be turned into a string
					try:
						options[i] = str(options[i])
					except ValueError:
						raise ValueError('__options__[%d]' % i)

			# Else we have no validation for the type
			else:
				raise TypeError('can not set __options__ for ' + self._type)

			# If it's already in the list, raise an error
			if options[i] in lOpts:
				sys.stderr.write('__options__[' + str(i) + '] is a duplicate')

			# Store the option
			else:
				lOpts.append(options[i])

		# Store the list of options
		self._options = lOpts
746623
def default_value(self):
        
        if callable(self.default) and self.call_default:
            return self.default()
        return self.default
925754
def _get_option_value(self, key):
        
        fn_name = "set_{}_value".format(key)
        if key in self.overrides:
            val = self.overrides[key]
        elif hasattr(self, fn_name):
            val = getattr(self, fn_name)()
        else:
            val = self.defaults[key]["d"]

        if self.defaults[key]["t"] == constants.FT_PARAM:
            return val.split("|")
        else:
            return val
783310
def form_option(str_opt):
    '''
    '''

    str_base = '#cmdoption-arg-'
    str_opt_x = str_base+str_opt.lower()\
        .replace('_', '-')\
        .replace('(', '-')\
        .replace(')', '')
    return str_opt_x
573707
def get_default_value(self):
        
        default = self.default_value
        if isinstance(default, collections.Callable):
            default = default()
        return default
205032
def default(self):
        
        if isinstance(self.__default, (str, unicode)):
            return self.valueFromString(self.__default)
        else:
            return self.__default
1082308
def value(self):
        
        if self.opts['int']:
            return int(self.val)
        else:
            return float(self.val)
1240101
def _choose(self):
        
        answer = "all"

        if not self.force:
            for i, value in enumerate(self.current_values):
                self.out("{:>2d}. {}".format(i + 1, value))

            answer = self.prompt(
                'Which value to remove? Enter number or "all": ')

        if answer != "all":
            try:
                answer = int(answer) - 1

                if answer < 0 or answer >= len(self.current_values):
                    answer = None
            except ValueError:
                answer = None

        return answer
797149
def __option(self):
		
		section = self.section()
		option = self.option_prefix()
		if self.config().has_option(section, option) is False:
			raise NoOptionError(option, section)
		return section, option
1252750
def get_value(self, subsystem, option):
        
        assert subsystem in self, 'Subsystem {} is missing'.format(subsystem)
        return util.read_file(self.per_subsystem[subsystem], subsystem + '.' + option)
635225
def get_options(self):
        
        choices = self._field_choices()
        if choices:
            return [c[1] for c in choices]
        else:
            return self.model.objects.\
                order_by(self.name).\
                values_list(self.name, flat=True)
1157959
def options(self):
        
        options = self.attributes['options']
        if isinstance(options, six.string_types):
            options = shlex.split(options)
        options = [str(e) for e in options]
        return options
1201028
def _options_string(self):
        
        if len(self.options) > 0:
            s = ""
            for op in self.options:
                if self._sized_op:
                    s += "{:s}={:s} ".format(*map(str, op))
                else:
                    s += "{:s} ".format(str(op))
            return s.strip()
        else:
            return ""