Gets an int config value
        :param section: Section
        :param key: Key
        :param fallback: Optional fallback value
965474
def _get_config_int(self, section: str, key: str, fallback: int=object()) -> int:
        
        return self._config.getint(section, key, fallback=fallback)
347956
def get_option_int(self, name, section=None, vars=None, expect=None):
        """"""
        val = self.get_option(name, section, vars, expect)
        if val:
            return int(val)
540496
public function getValue( $key, $fallback = null ) {
		return array_key_exists( $key, $this->state )
			? $this->state[ $key ]
			: $fallback;
	}
300993
def load_config(self, conf):
        
        section = self.__class__.__name__

        if section not in conf.sections():
            logger.debug('Config section {} not in rc file'.format(
                self.__class__.__name__))
            return

        for key in conf[section].keys():
            if not hasattr(self, key):
                logger.debug('Config key {}.{} skipped'.format(section, key))
                continue

            val = conf[section].get(key)

            try:
                val = conf[section].getfloat(key)
            except ValueError:
                try:
                    val = conf[section].getboolean(key)
                except ValueError:
                    pass

            self.__dict__.update({key: val})

        self.check()
236082
def get(self, section, key):
        
        line = self._make_line(key)
        for line in self.get_line(section, line):
            yield line.value
272786
def set(self, section, key, value):
        

        conf = self.get_section_config(section)
        if isinstance(value, bool):
            conf[key] = str(value)
        else:
            conf[key] = value
        self.set_section_config(section, conf)
944809
def get_flag(var, fallback, expected=True, warn=True):
    """"""
    val = get_config_var(var)
    if val is None:
        if warn:
            log.debug("Config variable '%s' is unset, Python ABI tag may "
                      "be incorrect", var)
        return fallback()
    return val == expected
42916
def get_safe(self, section, key, default=None):
        
        try:
            return self.get(section, key)
        except (configparser.NoSectionError, configparser.NoOptionError):
            return default
680855
def _get_config_bool(self, section: str, key: str, fallback: bool=object()) -> bool:
        
        return self._config.getboolean(section, key, fallback=fallback)
303884
def set_to_default(section, key):
    
    section[key] = section.default_values.get(key, section[key])
148706
def get_config(self, section=None):
        
        config = self.session.config
        section = self.config_section() if section is None else section
        try:
            return config[section]
        except KeyError:
            config.add_section(section)
            return config[section]
915960
def get_one(self, section, key):
        
        lines = iter(self.get(section, key))
        try:
            return next(lines)
        except StopIteration:
            raise KeyError("Key %s not found in %s" % (key, section))
728286
def _get_config_float(self, section: str, key: str, fallback: float=object()) -> float:
        
        return self._config.getfloat(section, key, fallback=fallback)
419349
def get_config_value(self, k, i):
        """"""
        if(not isinstance(self.store[k], list)):
            return self.store[k]
        else:
            return self.store[k][i]
1080222
def item(self, section, it):
        
        for key, value in self.section(section, skip=[]):
            if key == it:
                return value
        raise ConfigError(
            "Item '{0}' not found in section '{1}'".format(it, section))
328074
def safe_get(self, section, key):
        
        try:
            #Use full parent function so we can replace it in the class
            # if desired
            return configparser.RawConfigParser.get(self, section, key)
        except (configparser.NoSectionError,
                configparser.NoOptionError):
            return None
486043
def get(cls, key, section=None, **kwargs):
        
        section = section or cls._default_sect
        if section not in cls._conf:
            cls._load(section=section)

        value = cls._conf[section].get(key)

        # if not found in context read default
        if not value and section != cls._default_sect:
            value = cls._conf[cls._default_sect].get(key) if cls._default_sect in cls._conf else None

        if value is None:
            if 'default' in kwargs:  # behave as {}.get(x, default='fallback')
                _def_value = kwargs['default']
                logger.warn("Static configuration [{}] was not found. Using the default value [{}].".format(key, _def_value))
                return _def_value
            else:
                raise InvalidConfigException(u'Not found entry: {}'.format(key))

        try:
            value = from_json(value)  # parse value
        except (TypeError, ValueError):
            pass  # if not json parseable, then keep the string value

        return value