Change an attribute of this track and return a new copy.
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
1043748
def copy(self):
        """"""
        return self.__class__(key=self._key, load=self._load, _set=set(self._set))
420840
def copy(self, *args, **kwargs):
        """"""

        for slot in self.__slots__:
            attr = getattr(self, slot)
            if slot[0] == '_':  # convert protected attribute name to public
                slot = slot[1:]
            if slot not in kwargs:
                kwargs[slot] = attr

        result = type(self)(*args, **kwargs)

        return result
488325
def update(self, instance, oldValue, newValue):
    """"""
    self.__set__(instance,
                 self.__get__(instance, None) + newValue - (oldValue or 0))
134526
def restore_attribute!(attr_name)
        attr_name = attr_name.to_s
        if attribute_changed?(attr_name)
          __send__("#{attr_name}=", attribute_was(attr_name))
          clear_attribute_change(attr_name)
        end
      end
75112
def alter_object(self, obj):
        
        for attname, field, replacer in self.replacers:
            currentval = getattr(obj, attname)
            replacement = replacer(self, obj, field, currentval)
            setattr(obj, attname, replacement)
282818
def _set_attr(self, attribute):
        

        self.tags.add(attribute)
        self.song.save()
1301362
protected void requestAttributeChange (
        String name, Object value, Object oldValue, Transport transport)
    {
        // dispatch an attribute changed event
        postEvent(new AttributeChangedEvent(_oid, name, value).
                  setOldValue(oldValue).setTransport(transport));
    }
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)
1273521
function(now) {
      now || (now = this.attributes);
      var old = this._previousAttributes;
      var changed = false;
      for (var attr in now) {
        if (!_.isEqual(old[attr], now[attr])) {
          changed = changed || {};
          changed[attr] = now[attr];
        }
      }
      return changed;
    }
906408
def copy(self):
        """"""
        return self.__class__(self._key, self._load, self._iteritems())
273140
def copyData(self, source):
        
        for attr in self.copyAttributes:
            selfValue = getattr(self, attr)
            sourceValue = getattr(source, attr)
            if isinstance(selfValue, BaseObject):
                selfValue.copyData(sourceValue)
            else:
                setattr(self, attr, sourceValue)
711310
def update(self, attrs):
        """"""

        data = self.dict()
        data.update(attrs)
        heartbeat = Heartbeat(data, self.args, self.configs, _clone=True)
        return heartbeat
176283
def copy_with_new_str(self, new_str):
        """"""
        # What to do when there are multiple Chunks with conflicting atts?
        old_atts = dict((att, value) for bfs in self.chunks
                    for (att, value) in bfs.atts.items())
        return FmtStr(Chunk(new_str, old_atts))
591841
def update(self, **kwargs):
        
        self.validate(**kwargs)
        for attr, value in kwargs.items():
            setattr(self, attr, value)
        return self
451972
def relabel(self, change):
        ""
        class_new,class_old,file_path = change.new,change.old,change.owner.file_path
        fp = Path(file_path)
        parent = fp.parents[1]
        self._csv_dict[fp] = class_new
387155
def update(self, attributes):
        
        for attribute in attributes:
            setattr(self, attribute, attributes[attribute])
        return self