Set attributes to dictionary values so can access via dot notation.
773213
def _set_attrs_to_values(self, response={}):
        
        for key in response.keys():
            setattr(self, key, response[key])
409013
def _set_attribute(self, name, value):
        """"""
        setattr(self, name, value)
        self.namespace.update({name: getattr(self, name)})
118107
def _key_dot_replace(self, rdict):
        """"""
        temp_dict = {}
        for key, value in iteritems(rdict):
            if isinstance(value, dict):
                value = self._key_dot_replace(value)
            temp_dict[key.replace('.', '_')] = value
        return temp_dict
705069
def set_attrs(self, **attrs):
        """"""
        self.attrs.update(attrs)
        self._backend.set_attrs(**attrs)
699096
def add_to_obj(obj, dictionary, objs=None, exceptions=None, verbose=0):
    
    if exceptions is None:
        exceptions = []
    for item in dictionary:
        if item in exceptions:
            continue
        if dictionary[item] is not None:
            if verbose:
                print("process: ", item, dictionary[item])
            key, value = get_key_value(dictionary[item], objs, key=item)
            if verbose:
                print("assign: ", key, value)
            try:
                setattr(obj, key, value)
            except AttributeError:
                raise AttributeError("Can't set {0}={1} on object: {2}".format(key, value, obj))
244867
def set_attrs(self):
        
        self.attrs.table_type = str(self.table_type)
        self.attrs.index_cols = self.index_cols()
        self.attrs.values_cols = self.values_cols()
        self.attrs.non_index_axes = self.non_index_axes
        self.attrs.data_columns = self.data_columns
        self.attrs.nan_rep = self.nan_rep
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
        self.attrs.levels = self.levels
        self.attrs.metadata = self.metadata
        self.set_info()
967508
def set_attributes(node, overwrite=True, **attributes):
    
    aset = node.attrs
    for k, v in attributes.items():
        if not overwrite and k in aset:
            pass
        elif v is None:
            if k in aset:
                del aset[k]
        else:
            aset[k] = v
407110
def flatatt(attrs):
    
    return _flatatt({k.replace('_', '-'): v for k, v in attrs.items()})
955362
def structure_attrs_fromdict(self, obj, cl):
        # type: (Mapping[str, Any], Type[T]) -> T
        """"""
        # For public use.
        conv_obj = {}  # Start with a fresh dict, to ignore extra keys.
        dispatch = self._structure_func.dispatch
        for a in cl.__attrs_attrs__:  # type: ignore
            # We detect the type by metadata.
            type_ = a.type
            name = a.name

            try:
                val = obj[name]
            except KeyError:
                continue

            if name[0] == "_":
                name = name[1:]

            conv_obj[name] = (
                dispatch(type_)(val, type_) if type_ is not None else val
            )

        return cl(**conv_obj)
374977
def set_attributes(self, attributes):
        
        for k, v in attributes.items():
            self.set_attribute(k, v)
997540
def populate_obj(obj, attrs):
    
    for k, v in attrs.iteritems():
        setattr(obj, k, v)
434607
def set(self, key_or_attrs, value=None, unset=False):
        
        if isinstance(key_or_attrs, dict) and value is None:
            attrs = key_or_attrs
            keys = attrs.keys()
            for k in keys:
                if isinstance(attrs[k], LocalProxy):
                    attrs[k] = attrs[k]._get_current_object()
        else:
            key = key_or_attrs
            if isinstance(value, LocalProxy):
                value = value._get_current_object()
            attrs = {key: utils.decode(key, value)}

        if unset:
            for k in attrs.keys():
                attrs[k] = operation.Unset()

        self.validate(attrs)

        self._merge_metadata(attrs)

        keys = list(attrs.keys())
        for k in keys:
            v = attrs[k]
            # TODO: Relation

            if not isinstance(v, operation.BaseOp):
                v = operation.Set(v)

            self._attributes[k] = v._apply(self._attributes.get(k), self, k)
            if self._attributes[k] == operation._UNSET:
                del self._attributes[k]
            self._changes[k] = v._merge(self._changes.get(k))

        return self
402462
def setAttribute(values, value):
    
    if isinstance(value, int):
        values.add().int32_value = value
    elif isinstance(value, float):
        values.add().double_value = value
    elif isinstance(value, long):
        values.add().int64_value = value
    elif isinstance(value, str):
        values.add().string_value = value
    elif isinstance(value, bool):
        values.add().bool_value = value
    elif isinstance(value, (list, tuple, array.array)):
        for v in value:
            setAttribute(values, v)
    elif isinstance(value, dict):
        for key in value:
            setAttribute(
                values.add().attributes.attr[key].values, value[key])
    else:
        values.add().string_value = str(value)
952156
def _set_attributes(self, kwds):
    
    cls = self.__class__
    for name, value in kwds.iteritems():
      prop = getattr(cls, name)  # Raises AttributeError for unknown properties.
      if not isinstance(prop, Property):
        raise TypeError('Cannot set non-property %s' % name)
      prop._set_value(self, value)
1277013
def _set_attr(self, **kwargs):
        
        keys = c_str_array(kwargs.keys())
        vals = c_str_array([str(s) for s in kwargs.values()])
        num_args = mx_uint(len(kwargs))
        check_call(_LIB.MXSymbolSetAttrs(
            self.handle, num_args, keys, vals))
539861
def _set_attributes(self, response, attribute_dict):
        
        status_code = response.get(
            'HTTPStatusCode',
            response['ResponseMetadata']['HTTPStatusCode']
        )
        if status_code == 200:
            for k, v in attribute_dict.items():
                setattr(self, k, v)
627885
def put_attributes(self, attrs):
        
        assert(isinstance(attrs, dict)), "Argument must be a dict of key->values to save"
        for prop_name in attrs:
            value = attrs[prop_name]
            prop = self.find_property(prop_name)
            assert(prop), "Property not found: %s" % prop_name
            self._manager.set_property(prop, self, prop_name, value)
        self.reload()
        return self