update attributes initialized with the proper type
558633
def update(self, attrs):
        """"""
        self._validateAttrs(attrs)
        for k,v in attrs.items():
            typecast = type( getattr(self, k) )
            if typecast==bool and v=="False":   newval = False # "False" evalued as boolean is True because its length > 0
            else:                               newval = typecast(v.lower())
            setattr(self, k, newval)
352639
function setAttr(setModel, newValue, setOptions) {
      var oldValue = model._containedModels[attrName];

      // Pass through if removing
      if (newValue === undefined || newValue === null) {
        model._containedModels[attrName] = newValue;
        return;
      }

      // Is the new value the correct type?
      if (newValue instanceof Ctor) {

        // Directly set if no old value
        if (!oldValue instanceof Ctor) {
          model._containedModels[attrName] = newValue;
          return;
        }

        // They're both models.  Disregard if they're the same.
        var oldJSON = oldValue.toJSON({deep:true});
        var newJSON = newValue.toJSON({deep:true});
        if (_.isEqual(oldJSON, newJSON)) {
          return;
        }

        // Merge the raw JSON if they're both models
        newValue = newJSON;
      }

      // Keep the previous model and merge new data into it
      // For collections this relies on the Collection.set() method
      if (oldValue instanceof Ctor) {
        model.attributes[attrName] = oldValue;
        model._currentAttributes[attrName] = oldValue;
        model.changed[attrName] = oldValue;
        oldValue.set(newValue, setOptions);
        return;
      }

      // Create a new model or collection, passing the value
      newValue =
        model._containedModels[attrName] =
        model.attributes[attrName] =
        model._currentAttributes[attrName] =
        new Ctor(newValue, setOptions);

      // Watch for changes to the underlying model or collection
      // (collection add/remove), forwarding changes to this model
      newValue.on('change add remove reset', UI.onSubModelChange, {
        parent:model,
        attrName: attrName
      });
    }
352895
function updateAttributes( element ) {
		var attrs = element.attributes,
			styles;

		// Will be recreated later if any of styles/classes exists.
		delete attrs.style;
		delete attrs[ 'class' ];

		if ( ( styles = CKEDITOR.tools.writeCssText( element.styles, true ) ) )
			attrs.style = styles;

		if ( element.classes.length )
			attrs[ 'class' ] = element.classes.sort().join( ' ' );
	}
1255248
def update_attribute(attr,**kwargs):
    

    log.debug("Updating attribute: %s", attr.name)
    attr_i = _get_attr(attr.id)
    attr_i.name = attr.name
    attr_i.dimension_id = attr.dimension_id
    attr_i.description = attr.description

    #Make sure an update hasn't caused an inconsistency.
    #check_sion(attr_i.id)

    db.DBSession.flush()
    return JSONObject(attr_i)
356944
def change_attributes(self, **kwargs):
        '''
        
        '''
        new_track = Track(self.viewconf['type'])
        new_track.position = self.position
        new_track.tileset = self.tileset
        new_track.viewconf = json.loads(json.dumps(self.viewconf))
        new_track.viewconf = {**new_track.viewconf, **kwargs}

        return new_track
104459
private void addCreateUpdateAttributes() throws EFapsException
    {
        final Iterator<?> iter = getType().getAttributes().entrySet().iterator();
        while (iter.hasNext()) {
            final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) iter.next();
            final Attribute attr = (Attribute) entry.getValue();
            final AttributeType attrType = attr.getAttributeType();
            if (attrType.isCreateUpdate()) {
                addInternal(attr, false, (Object) null);
            }
            if (attr.getDefaultValue() != null) {
                addInternal(attr, false, attr.getDefaultValue());
            }
        }
    }
921174
def update_attributes(self, attributes):
        
        attribute_update = self._post_object(self.update_api.attributes.update, attributes)
        return ExistAttributeResponse(attribute_update)
1368723
def update_attributes(attrs)
      if id = attrs.delete(:id)
        @id = id
      end
      attrs.each do |key, value|
        setter = :"#{key}="
        send(setter, value) if respond_to?(setter)
      end
    end
551255
def update_or_create(self, attributes, values=None):
        
        instance = self.first_or_new(**attributes)

        instance.fill(values)

        instance.save()

        return instance
114379
function(el, attr, val, ieAttr) {
        if (el && el.setAttribute) {
            attr = Y.DOM.CUSTOM_ATTRIBUTES[attr] || attr;
            el.setAttribute(attr, val, ieAttr);
        }
    }
1080890
def attributes=(attrs = {})
      attrs.each do |attr_name, value|
        setter = "#{attr_name}="
        send(setter, value)
      end
    end
805874
def set_attrs(self):
        
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
599907
def perform_update(self, data, instance):
        

        for key, val in data.items():
            setattr(instance, key, val)
830537
def update_attributes(attributes)
      attributes.each do |attribute, value|
        unless COMMON_ATTRIBUTES.value?(attribute)
          raise ArgumentError, "Invalid attribute: #{attribute}"
        end

        public_send(:"#{attribute}=", value)
      end
    end
1134816
def update(attributes)
      load_attributes(
          Core::RestApi.instance.put(path, attributes, if_match_header))
    end
733177
def _initialize_attributes(model_class, name, bases, attrs):
    """"""
    model_class._attributes = {}
    for k, v in attrs.iteritems():
        if isinstance(v, Attribute):
            model_class._attributes[k] = v
            v.name = v.name or k
202019
def reset_attribute!(attr)
      attr = database_field_name(attr)
      attributes[attr] = changed_attributes.delete(attr) if attribute_changed?(attr)
    end