Set attributes.

        :param obj: requested object.
        :param attributes: dictionary of {attribute: value} to set
327039
def set_attributes(self, obj, **attributes):
        
        for attribute, value in attributes.items():
            self.send_command(obj, attribute, value)
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))
1209787
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(NUMBER)) {
            if (!(obj instanceof BigInteger)) {
                throw new IOException("Attribute must be of type BigInteger.");
            }
            crlNumber = (BigInteger)obj;
        } else {
          throw new IOException("Attribute name not recognized by"
                                + " CertAttrSet:" + extensionName + ".");
        }
        encodeThis();
    }
1184077
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(PERMITTED_SUBTREES)) {
            if (!(obj instanceof GeneralSubtrees)) {
                throw new IOException("Attribute value should be"
                                    + " of type GeneralSubtrees.");
            }
            permitted = (GeneralSubtrees)obj;
        } else if (name.equalsIgnoreCase(EXCLUDED_SUBTREES)) {
            if (!(obj instanceof GeneralSubtrees)) {
                throw new IOException("Attribute value should be "
                                    + "of type GeneralSubtrees.");
            }
            excluded = (GeneralSubtrees)obj;
        } else {
          throw new IOException("Attribute name not recognized by " +
                        "CertAttrSet:NameConstraintsExtension.");
        }
        encodeThis();
    }
320657
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(KEY_ID)) {
            if (!(obj instanceof KeyIdentifier)) {
              throw new IOException("Attribute value should be of" +
                                    " type KeyIdentifier.");
            }
            id = (KeyIdentifier)obj;
        } else {
          throw new IOException("Attribute name not recognized by " +
                "CertAttrSet:SubjectKeyIdentifierExtension.");
        }
        encodeThis();
    }
375873
def set_object(self, obj, properties):
        """"""
        self._objects.add(obj)
        properties = set(properties)
        self._properties |= properties
        pairs = self._pairs
        for p in self._properties:
            if p in properties:
                pairs.add((obj, p))
            else:
                pairs.discard((obj, p))
542455
def set_value(obj, attrs, value, _copy=False):
    
    for attr in attrs:
        if _copy:
            value = copy(value)
        setattr(obj, attr, value)
951885
def convert_attrs_to_int(obj: Any,
                         attrs: Iterable[str],
                         default: int = None) -> None:
    
    for a in attrs:
        value = convert_to_int(getattr(obj, a), default=default)
        setattr(obj, a, value)
378714
function setAttributes(el, attributes) {
	console.log('setting attributes on element...', el, attributes);
    _.each(attributes, (value, name) => el.setAttribute(name, value));
}
230078
def set_nested_attribute(obj, attribute, value):
    
    parent, attr = resolve_nested_attribute(obj, attribute)
    if parent is None:
        raise AttributeError('Can not set attribute "%s" on None value.'
                             % attr)
    setattr(parent, attr, value)
811752
def attributes=(attributes = {})
      attributes.each_pair { |k, v|
        respond_to?(name = "#{k}=") and send(name, v) or self[k] = v
      }
    end
385666
function(node, obj) {
        var value;
        for(var name in obj) {
            value = obj[name].toString();
            if(value.match(/[A-Z]/)) {
                // safari lowercases attributes with setAttribute
                this.setAttributeNS(node, null, name, value);
            } else {
                node.setAttribute(name, value);
            }
        }
    }
282818
def _set_attr(self, attribute):
        

        self.tags.add(attribute)
        self.song.save()
514716
def setAttributesJson(self, attributesJson):
        
        try:
            self._attributes = json.loads(attributesJson)
        except:
            raise exceptions.InvalidJsonException(attributesJson)
        return self
203606
function _setAttributes(el, attrs) {
  Object.keys(attrs).forEach((key) => {
    el.setAttribute(key, attrs[key]);
  });
}
1087946
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(KEY)) {
            this.key = (PublicKey)obj;
        } else {
            throw new IOException("Attribute name not recognized by " +
                                  "CertAttrSet: CertificateX509Key.");
        }
    }
453733
def set_attributes(self, attributes):
        
        # pylint: disable=no-member
        for attribute in attributes:
            if attribute.name in self.attributes:
                set_att_def_value(self.attributes[attribute.name], attribute.value, attribute.name, self.name)
                try:
                    set_att_def_value(self.attributes[attribute.name], attribute.value, attribute.name, self.name)
                except TypeError as terr:
                    six.print_("Error while trying to set value of attribute {0} to {1} in " \
                          "parameter {2}" \
                          "".format(attribute.name, attribute.value, self.name))
                    raise terr
            elif attribute.name in self.qualifiers:
                set_att_def_value(self.qualifiers[attribute.name], attribute.value, attribute.name, self.name)
                try:
                    set_att_def_value(self.qualifiers[attribute.name], attribute.value, attribute.name, self.name)
                except TypeError as terr:
                    six.print_("Error while trying to set value of qualifier {0} to " \
                               "{1} in parameter {2}".format(attribute.name,
                                                             attribute.value,
                                                             self.name))
                    raise terr
            else:
                raise UnknownAcdPropertyException(attribute.name,
                                                  attribute.value, self.name)