Returns a dictionary value
189989
def get(self, key, default_val=None, require_value=False):
        
        val = dict.get(self, key, default_val)
        if val is None and require_value:
            raise KeyError('key "%s" not found' % key)
        if isinstance(val, dict):
            return AttributeDict(val)
        return val
1079176
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'match') and self.match is not None:
            _dict['match'] = self.match
        return _dict
825247
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'name') and self.name is not None:
            _dict['name'] = self.name
        if hasattr(self, 'limit') and self.limit is not None:
            _dict['limit'] = self.limit
        return _dict
828103
def dict(self):
        
        return {k: getattr(self, k) for k in self.__class__.defaults}
1153719
def to_dict(self):
        
        with self._lock:
            result = {}
            if self._gpayload:
                result.update(self._gpayload)
            if self._tpayload:
                result.update(getattr(self._tpayload, "context", {}))
            return result
1328680
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'key' in _dict:
            args['key'] = Key._from_dict(_dict.get('key'))
        if 'value' in _dict:
            args['value'] = Value._from_dict(_dict.get('value'))
        return cls(**args)
1154989
def to_dict(self):
        
        return dict(
            (k, self.__dict__[k]) for k in self.__dict__ if k.find("_") != 0)
572265
def valuesToDict(key):
    """"""
    d = {}
    size = _winreg.QueryInfoKey(key)[1]
    for i in xrange(size):
        d[_winreg.EnumValue(key, i)[0]] = _winreg.EnumValue(key, i)[1]
    return d
749623
def to_dict(cls):
        
        return dict((item.name, item.number) for item in iter(cls))
1055320
def asDict(self, returnIntegers=True):
        
        d = {}
        for k, v in self.items():
            d[k] = v if not returnIntegers else normalizers.normalizeRounding(v)
        return d
778269
def as_dict(self):
        """"""
        attrs = vars(self)
        return {key: attrs[key] for key in attrs if not key.startswith('_')}
317531
def _opts_to_dict(*opts):
	''''''
	ret = {}
	for key, val in opts:
		if key[:2] == '--':
			key = key[2:]
		elif key[:1] == '-':
			key = key[1:]
		if val == '':
			val = True
		ret[key.replace('-','_')] = val
	return ret
454133
def to_dict(self):
        

        def transform_value(value):
            if isinstance(value, list):
                return [transform_value(v) for v in value]
            elif isinstance(value, collections.Mapping):
                return dict([
                    (k, transform_value(v))
                    for k, v in iteritems(value)])
            else:
                return value

        return transform_value(dict(self))
172121
def _handle_key_value(t_dict, key, value):
    
    if key in t_dict:
        val = t_dict[key]
        if isinstance(val, str):
            val = [val]
        val.append(value)
        return val
    return value
1219704
def dict(
        self, *, include: 'SetStr' = None, exclude: 'SetStr' = None, by_alias: bool = False, skip_defaults: bool = False
    ) -> 'DictStrAny':
        
        get_key = self._get_key_factory(by_alias)
        get_key = partial(get_key, self.fields)

        return_keys = self._calculate_keys(include=include, exclude=exclude, skip_defaults=skip_defaults)
        if return_keys is None:
            return {get_key(k): v for k, v in self._iter(by_alias=by_alias, skip_defaults=skip_defaults)}
        else:
            return {
                get_key(k): v for k, v in self._iter(by_alias=by_alias, skip_defaults=skip_defaults) if k in return_keys
            }
368785
def _get_value(data_structure, key):
    
    if len(key) == 0:
        raise KeyError()
    value = data_structure[key[0]]
    if len(key) > 1:
        return _get_value(value, key[1:])
    return value
74470
def values(self) -> typing.Dict[str, str]:
        """"""
        return {k: v for k, v in self._items if v is not None}