Return value of key as an int

        :param item: key of value to transform
        :param default: value to return if item does not exist
        :return: int of value
341404
def int(self, item, default=None):
        
        try:
            item = self.__getattr__(item)
        except AttributeError as err:
            if default is not None:
                return default
            raise err
        return int(item)
1107119
def count(self, item):
        """"""
        try:
            return self.items.get(item, 0)
        except TypeError:
            return self.items.get(repr(item), 0)
1096835
def get_stats_value(self, item, value):
        
        if not isinstance(self.stats, list):
            return None
        else:
            if value.isdigit():
                value = int(value)
            try:
                return self._json_dumps({value: [i for i in self.stats if i[item] == value]})
            except (KeyError, ValueError) as e:
                logger.error(
                    "Cannot get item({})=value({}) ({})".format(item, value, e))
                return None
567241
def to_int(self):
        
        num = self.to_uint()
        if num and self._items[-1].unbox():
            return num - (1 << self.size)
        else:
            return num
708098
def getInt(self, name, default=0, parent_search=False, multikeys_search=False):
		
		try:
			value = self.get(name, default, parent_search, multikeys_search)
			return int(value)

		except:
			# pas de configuration trouvé ou convertion impossible ?
			return default
908371
def getint(self, key, **kwargs):
        

        return self.get(key, cast_func=int, **kwargs)
1008315
public function getInt(string $key, int $default = null) : int
    {
        return (int) $this->get($key, $default);
    }
787576
def bool(self, item, default=None):
        
        try:
            item = self.__getattr__(item)
        except AttributeError as err:
            if default is not None:
                return default
            raise err

        if isinstance(item, (bool, int)):
            return bool(item)

        if (isinstance(item, str) and
                item.lower() in ('n', 'no', 'false', 'f', '0')):
            return False

        return True if item else False
1015964
public int getInt(int key, int defaultValue) {
        if (key < 0) Kit.codeBug();
        int index = findIndex(key);
        if (0 <= index) {
            if (ivaluesShift != 0) {
                return keys[ivaluesShift + index];
            }
            return 0;
        }
        return defaultValue;
    }
486877
def dottable_getitem(data, dottable_key, default=None):
    
    def getitem(value, *keys):
        if not keys:
            return default
        elif len(keys) == 1:
            key = keys[0]
            if isinstance(value, MutableMapping):
                return value.get(key, default)
            elif isinstance(value, Sequence) and \
                    not isinstance(value, six.string_types):
                return [getitem(v, key) for v in value]
            return default
        return getitem(getitem(value, keys[0]), *keys[1:])
    return getitem(data, *dottable_key.split('.'))
975200
public int getInt(String key, int defaultValue) {
    if (containsKey(key)) {
      return Integer.parseInt(get(key));
    } else {
      return defaultValue;
    }
  }
510246
def get(self, key, default=None):
        
        try:
            return self.items[key]
        except IndexError:
            return value(default)
137085
def get(self, key, default=None):
        
        try:
            val = self
            if "." not in key:
                return self[key]
            for k in key.split('.'):
                if k.isdigit():
                    k = int(k)
                val = val[k]
            return val
        except (TypeError, KeyError, IndexError) as e:
            return default
972368
def get(self, key, default=None):
        
        val = self._store.get(key)

        if val is None:
            return value(default)

        return val
489730
def data_item(data):
    
    if isinstance(data, ndict):
        # OK, we have something that looks like {0: ('a', 'b')}
        # or something that is a regular dictionary
        # so try to return 'a' regardless of the length
        for item in data:
            return repr(data[item][0])
    elif isinstance(data, dict):
        for item in data:
            return repr(data[item])
    elif isinstance(data, list):
        return repr(data[0])
    return repr(data)
400818
def setdefault(self, key, default=None):
        
        if key in self:
            return self[key]
        else:
            self._setitem(key, default)
            self._list_add(key)
            return default
925540
def pop(self, key, default=None):
        
        with self.lock:
            try:
                item = OrderedDict.__getitem__(self, key)
                del self[key]
                return item[0]
            except KeyError:
                return default