Model Reset does a deep reset on the data tree starting at this Model. A `previousAttributes` property is set on the `options` property with the Model's old values.
3910
function(obj, options){
    var changed = {}, key, value;
    options || (options = {});
    options.reset = true;
    obj = (obj && obj.isModel && obj.attributes) || obj || {};
    options.previousAttributes = _.clone(this.attributes);

    // Any unset previously existing values will be set back to default
    _.each(this.defaults, function(val, key){
      if(!obj.hasOwnProperty(key)){ obj[key] = val; }
    }, this);

    // Iterate over the Model's attributes:
    // - If the property is the `idAttribute`, skip.
    // - If the properties are already the same, skip
    // - If the property is currently undefined and being changed, assign
    // - If the property is a `Model`, `Collection`, or `ComputedProperty`, reset it.
    // - If the passed object has the property, set it to the new value.
    // - If the Model has a default value for this property, set it back to default.
    // - Otherwise, unset the attribute.
    for(key in this.attributes){
      value = this.attributes[key];
      if(value === obj[key]){ continue; }
      else if(_.isUndefined(value) && !_.isUndefined(obj[key])){ changed[key] = obj[key]; }
      else if (value.isComponent){ continue; }
      else if (value.isCollection || value.isModel || value.isComputedProperty){
        value.reset((obj[key] || []), {silent: true});
        if(value.isCollection) changed[key] = value.previousModels;
        else if(value.isModel && value.isComputedProperty) changed[key] = value.cache.model.changedAttributes();
        else if(value.isModel) changed[key] = value.changedAttributes();
      }
      else if (obj.hasOwnProperty(key)){ changed[key] = obj[key]; }
      else{
        changed[key] = undefined;
        this.unset(key, {silent: true});
      }
    }

    // Any new values will be set to on the model
    _.each(obj, function(val, key){
      if(_.isUndefined(changed[key])){ changed[key] = val; }
    });

    // Reset our model
    obj = this.set(obj, _.extend({}, options, {silent: true, reset: false}));

    // Trigger custom reset event
    this.changed = changed;
    if (!options.silent){ this.trigger('reset', this, options); }

    // Return new values
    return obj;
  }
552336
def _reset(self, name=None):
        
        if name is None:
            for key in self._props:
                if isinstance(self._props[key], basic.Property):
                    self._reset(key)
            return
        if name not in self._props:
            raise AttributeError("Input name '{}' is not a known "
                                 "property or attribute".format(name))
        if not isinstance(self._props[name], basic.Property):
            raise AttributeError("Cannot reset GettableProperty "
                                 "'{}'".format(name))
        if name in self._defaults:
            val = self._defaults[name]
        else:
            val = self._props[name].default
        if callable(val):
            val = val()
        setattr(self, name, val)
1249680
def reset(self):
        '''
        
        '''
        self.terms = OrderedDict()
        self.y = None
        self.backend = None
        self.added_terms = []
        self._added_priors = {}
        self.completes = []
        self.clean_data = None
770488
def _reset(self):
        
        self._last_start_line = 0
        self._colour = None
        self._attr = None
        self._bg = None
        self._cur_x = None
        self._cur_y = None
1327763
public void reset() {
        attribute = null;
        tags.clear();
        inherits.clear();
        attributes.clear();
        Strings.clearBuilder(builder);
    }
212403
function(attributes, options) {
    BaseModel.__super__.initialize.apply(this, [attributes, options]);
    this.options = options ? _.clone(options) : {};
    this._processSchema();
    // attributes which have changed since this model was synced
    this._changedSinceSync = {};
    // attributes which this model had when last synced
    this._attributesOnSync = false;
    this.on('change', this.attributesChanged, this);
    this.on('sync', this.modelSynced, this);
  }
777349
def _reset_model(self, table, model):
        """"""
        old_sel_model = table.selectionModel()
        table.setModel(model)
        if old_sel_model:
            del old_sel_model
176704
function(key, value, options) {
      var attrs, attr, val;

      // Handle both `"key", value` and `{key: value}` -style arguments.
      if (_.isObject(key) || key == null) {
        attrs = key;
        options = value;
      } else {
        attrs = {};
        attrs[key] = value;
      }

      // Extract attributes and options.
      options || (options = {});
      if (!attrs) return this;
      if (attrs instanceof Model) attrs = attrs.attributes;
      if (options.unset) for (attr in attrs) attrs[attr] = void 0;

      // Run validation.
      if (!this._validate(attrs, options)) return false;

      // Check for changes of `id`.
      if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];

      var changes = options.changes = {};
      var now = this.attributes;
      var escaped = this._escapedAttributes;
      var prev = this._previousAttributes || {};

      // For each `set` attribute...
      for (attr in attrs) {
        val = attrs[attr];

        // If the new and current value differ, record the change.
        if (!_.isEqual(now[attr], val) || (options.unset && _.has(now, attr))) {
          delete escaped[attr];
          (options.silent ? this._silent : changes)[attr] = true;
        }

        // Update or delete the current value.
        options.unset ? delete now[attr] : now[attr] = val;

        // If the new and previous value differ, record the change.  If not,
        // then remove changes for this attribute.
        if (!_.isEqual(prev[attr], val) || (_.has(now, attr) != _.has(prev, attr))) {
          this.changed[attr] = val;
          if (!options.silent) this._pending[attr] = true;
        } else {
          delete this.changed[attr];
          delete this._pending[attr];
        }
      }

      // Fire the `"change"` events.
      if (!options.silent) this.change(options);
      return this;
    }
1345837
void recomposeAttributeSets(ElemAttributeSet attrSet)
  {
    ArrayList attrSetList = (ArrayList) m_attrSets.get(attrSet.getName());

    if (null == attrSetList)
    {
      attrSetList = new ArrayList();

      m_attrSets.put(attrSet.getName(), attrSetList);
    }

    attrSetList.add(attrSet);
  }
513526
def reset ():
    
    global __all_attributes, __all_features, __implicit_features, __composite_properties
    global __subfeature_from_value, __all_top_features, __free_features
    global __all_subfeatures

    # sets the default value of False for each valid attribute
    for attr in VALID_ATTRIBUTES:
        setattr(Feature, attr.replace("-", "_"), False)

    # A map containing all features. The key is the feature name.
    # The value is an instance of Feature class.
    __all_features = {}

    # All non-subfeatures.
    __all_top_features = []

    # Maps valus to the corresponding implicit feature
    __implicit_features = {}

    # A map containing all composite properties. The key is a Property instance,
    # and the value is a list of Property instances
    __composite_properties = {}

    # Maps a value to the corresponding subfeature name.
    __subfeature_from_value = {}

    # All free features
    __free_features = []

    __all_subfeatures = []
58212
def reset( self ):
        
        dataSet = self.dataSet()
        if ( not dataSet ):
            dataSet = XScheme()
        
        dataSet.reset()
1103463
void reset()
  {
    _deleteNode = null;
    _deleteIndex = 0;
    _targetNode = null;
    _targetIndex = 0;
    _type = NONE;
    _notFound = true;
  }
1303916
def _reset(self):
        
        # Reset DataContainer to default values
        # So that it can be reused
        if self.logger: # pragma: no cover
            self.logger.info("Reset DataContainer")
        self._items_list = []
        self._config.data_type = None
983796
def assign_attributes(attrs, initial_setup = false, skip_changes = false)
      attrs = wrap_values(attrs)

      if attrs
        # When doing a mass-assign, we don't validate or save until the end.
        if initial_setup || skip_changes
          Model.no_change_tracking do
            assign_all_attributes(attrs, skip_changes)
          end
        else
          assign_all_attributes(attrs)
        end
      else
        # Assign to empty
        @attributes = {}
      end

      # Trigger and change all
      @deps.changed_all!
      @deps = HashDependency.new

      run_initial_setup(initial_setup)
    end
1247817
def reset_current_row(self, *args, **kwargs):
        
        i = self.configobj_treev.currentIndex()
        m = self.configobj_treev.model()
        m.restore_default(i)
192813
function(options) {
      var attrs = {};
      for (var key in this.attributes) attrs[key] = void 0;
      return this.set(attrs, _.extend({}, options, {unset: true}));
    }
161416
def reset(self):
        
        with util.disable_constant(self):
            for k, p in self.params().items():
                if k != 'name':
                    setattr(self, k, p.default)