Update input attr in self.

        Return list of attributes with changed values.
502779
def update_attr(self, attr):
        
        changed_attr = []
        for key, value in attr.items():
            if value is None:
                continue
            if getattr(self, "_{0}".format(key), None) != value:
                changed_attr.append(key)
                self.__setattr__("_{0}".format(key), value)
                _LOGGER.debug('%s: update %s with %s', self.name, key, value)
        return changed_attr
1248417
def patch(attrs, updates):
    """"""
    orig = {}
    for attr, value in updates:
        orig[attr] = attrs[attr]
        attrs[attr] = value
    return orig
895946
def update_with(self, **query):
        
        for k, v in self._filter_attrs(query).items():
            setattr(self, k, v)
        return self.save()
202019
def reset_attribute!(attr)
      attr = database_field_name(attr)
      attributes[attr] = changed_attributes.delete(attr) if attribute_changed?(attr)
    end
480182
def _combine_attr_fast_update(self, attr, typ):
        '''

        '''
        values = dict(getattr(self, attr, {}))
        
        for base in self._class_data.bases:
            vals = dict(getattr(base, attr, {}))
            preserve_attr_data(vals, values)
            values = combine(vals, values)
            
        setattr(self, attr, typ(values))
431537
def update_selector(attributes, operator)
      attributes.each { |key, value| @selector[key] = { operator => value } }; self
    end
1214340
def update(self, other, copy=True, *args, **kwargs):
        """"""

        if other:  # dirty hack for python2.6

            if isinstance(other, self.__class__):

                if copy:
                    other = other.copy(*args, **kwargs)

                for slot in other.__slots__:
                    attr = getattr(other, slot)
                    if attr is not None:
                        setattr(self, slot, attr)

            else:
                raise TypeError(
                    'Wrong element to update with {0}: {1}'.format(self, other)
                )

        return self
20219
def update_attributes(atts)
      atts.delete('_type')
      atts.each { |att, val| send(:"#{att}=", val) }
    end
922002
def update(attrs, safe = false)
      self.attributes = attrs
      if new_record?
        _root.send(:_save, safe) if _root
        _save(safe)
      else
        _update_attributes(converted_attributes(attrs), safe)
      end
    end
1064615
def update_widget_attrs(self, bound_field, attrs):
        
        bound_field.form.update_widget_attrs(bound_field, attrs)
        widget_classes = self.widget.attrs.get('class', None)
        if widget_classes:
            if 'class' in attrs:
                attrs['class'] += ' ' + widget_classes
            else:
                attrs.update({'class': widget_classes})
        return attrs
805874
def set_attrs(self):
        
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
1159373
def update(cls, settings):
        """"""
        for key, val in settings.__dict__.items():
            if key.startswith('_'):
                continue
            setattr(cls, key, val)
1271378
def update(self, **kwargs):
        
        data = self._generate_input_dict(**kwargs)
        self.load(self.client.put('/'.join(self.url.split('/')[:-1]) + 's', data=data))
        return self
385460
def update(self, data_=None, **kwargs):
    
    if data_ is None:
      data_ = dict()
    else:
      data_ = dict(data_)
    data_.update(**kwargs)
    changes = set()
    for attr_name in data_:
      if hasattr(self, attr_name):
        if getattr(self, attr_name) != data_[attr_name]:
          changes.add(attr_name)
          setattr(self, attr_name, data_[attr_name])
      else:
        if self.strict_attrs:
          raise Exception("Unknown attribute for {}: {}".format(self.__class__.__name__, attr_name))
    return changes
1134816
def update(attributes)
      load_attributes(
          Core::RestApi.instance.put(path, attributes, if_match_header))
    end
957801
def update_widget_attrs(self, bound_field, attrs):
        
        if bound_field.field.has_subwidgets() is False:
            widget_classes = getattr(self, 'widget_css_classes', None)
            if widget_classes:
                if 'class' in attrs:
                    attrs['class'] += ' ' + widget_classes
                else:
                    attrs.update({'class': widget_classes})
        return attrs
577516
def modify(self, **kwargs):
        """"""
        for key, val in kwargs.items():
            setattr(self, key, val)
        return self