These allow for direct access to the dictionary holding
        the set under a different naming convention (to prevent
        dictionary like syntax from working on external interface).
344261
def _dict_set(self, key, val):
        '''
        
        '''
        if key != None and self.stringify_keys:
            key = str(key)
        db = self._keyed_db[self.split_func(key)]
        db._dict_set(key, val)
122368
function setStandard(descriptor,key,set,update)
        {
          var _descriptor = descriptor,
              _descGet = _descriptor.get,
              _descSet = _descriptor.set,
              _key = key,
              _set = set,
              _update = update,
              _oldValue;
          return function standardSet(v)
          {
             _oldValue = _descGet.call(this);
             if(_set(this,_key,v,_oldValue,undefined,this._stopChange))
             {
               _descSet.call(this,v);
             }
             if(!this._stopChange)
             {
               _update(this,_key,v,_oldValue);
             }
             this._stopChange = undefined;
          }
        }
554883
def ac(d, key, **kwarg):
        
        if kwarg:
            d[key] = {_meta: kwarg}
        else:
            d[key] = dict()
471301
def _switch_charset_dict(characters, target=''):
    '''
    
    '''
    offset_characters = {}
    offset = block_offset * offsets[target]['direction']
    for char in characters:
        offset_key = chr(ord(char) + offset)
        offset_value = chr(ord(characters[char]) + offset)
        offset_characters[offset_key] = offset_value

    return offset_characters
233094
def bind_key_name(self, function, object_name):
        """"""
        for funcname, name in self.name_map.items():
            if funcname == function:
                self.name_map[
                    funcname] = object_name
711526
def _convert_to_dict(self, setting):
        '''
        
        '''
        the_dict = {}
        set = dir(setting)
        for key in set:
            if key in self.ignore:
                continue
            value = getattr(setting, key)
            the_dict[key] = value

        return the_dict
340939
def set_dict_options(self, options):
        
        if isinstance(options, dict):
            for key, option_data in options.items():
                self.set_options(key, option_data)
        else:
            raise OptionTypeError("Not An Accepted Input Format: %s. Must be Dictionary" %type(options))
506090
def public_dict(d):
    

    if isinstance(d, dict):
        safe_dict = dict((key, public_dict(value)) for key, value in d.items() if not key.startswith('_'))
        if '_cls' in d:
            safe_dict['type'] = d['_cls']
        return safe_dict
    if isinstance(d, list):
        return [public_dict(l) for l in d]

    return d
232239
def _copy_interfaces_info(interfaces):
    '''
    
    '''
    ret = {}

    for interface in interfaces:
        _interface_attrs_cpy = set()
        for attr in ATTRS:
            if attr in interfaces[interface]:
                attr_dict = Hashabledict()
                attr_dict[attr] = repr(interfaces[interface][attr])
                _interface_attrs_cpy.add(attr_dict)
        ret[interface] = _interface_attrs_cpy

    return ret
862410
def _set_other(self):
        """"""
        # manage not setting if not mandatory for numpy
        if self.dst.style['in'] == 'numpydoc':
            if self.docs['in']['raw'] is not None:
                self.docs['out']['post'] = self.dst.numpydoc.get_raw_not_managed(self.docs['in']['raw'])
            elif 'post' not in self.docs['out'] or self.docs['out']['post'] is None:
                self.docs['out']['post'] = ''
1010291
def private_names_for(cls, names):
    """"""
    if not isinstance(names, Iterable):
        raise TypeError('names must be an interable')
    return (private_name_for(item, cls) for item in names)
880390
def share_settings(self, other, keylist=None, include_callbacks=True,
                       callback=True):
        
        if keylist is None:
            keylist = self.group.keys()
        if include_callbacks:
            for key in keylist:
                oset, mset = other.group[key], self.group[key]
                other.group[key] = mset
                oset.merge_callbacks_to(mset)
        if callback:
            # make callbacks only after all items are set in the group
            # TODO: only make callbacks for values that changed?
            for key in keylist:
                other.group[key].make_callback('set', other.group[key].value)
794874
def rename_key(d: Dict[str, Any], old: str, new: str) -> None:
    
    d[new] = d.pop(old)
534824
def _fix_set_options(cls, options):
        """"""
        optional_set_options = ('ignore', 'select')
        mandatory_set_options = ('add_ignore', 'add_select')

        def _get_set(value_str):
            """Split `value_str` by the delimiter `,` and return a set.

            Removes any occurrences of '' in the set.
            Also expand error code prefixes, to avoid doing this for every
            file.

            """
            return cls._expand_error_codes(set(value_str.split(',')) - {''})

        for opt in optional_set_options:
            value = getattr(options, opt)
            if value is not None:
                setattr(options, opt, _get_set(value))

        for opt in mandatory_set_options:
            value = getattr(options, opt)
            if value is None:
                value = ''

            if not isinstance(value, Set):
                value = _get_set(value)

            setattr(options, opt, value)

        return options
1081125
def asdict(self, name, _type=None, _set=False):
        

        if _type is None:
            _type = lambda t: t

        dict_str = self.pop(name, None)
        if not dict_str:
            return {}

        _dict = {}
        for item in split_strip(dict_str):
            key, _, val = item.partition(':')
            val = _type(val)
            if key in _dict:
                if isinstance(_dict[key], list):
                    _dict[key].append(val)
                else:
                    _dict[key] = [_dict[key], val]
            else:
                _dict[key] = val

        if _set:
            self[name] = _dict

        return _dict
919107
def clean_dict_keys(d):
    
    new_d = {}
    for (k, v) in d.iteritems():
        new_d[str(k)] = v
    return new_d
734833
def nested_set_dict(d, keys, value):
    
    assert keys
    key = keys[0]
    if len(keys) == 1:
        if key in d:
            raise ValueError("duplicated key '{}'".format(key))
        d[key] = value
        return
    d = d.setdefault(key, {})
    nested_set_dict(d, keys[1:], value)