Defines the value for the inputted key by setting both its default and \
        value to the inputted value.
        
        :param      key   | <str>
                    value | <variant>
513776
def define(self, key, value):
        
        skey = nstr(key)
        self._defaults[skey] = value
        self[skey] = value
426518
def set_property(self, key, value):
        

        if type(key) is str and type(value) is str:
            self.process_pair(key, value)
        else:
            raise TypeError('Both key and value should be strings!')
158847
def set(self, key: Any, value: Any) -> None:
        
        if key is not None:
            self[key] = value
965843
def _setdefault(obj, key, value):
    
    v = obj.get(key)
    if v == None:
        obj[key] = value
        return value
    return v
1100183
def set_value(self, key, value):
        
        file_cache = self.read_file()
        if file_cache:
            file_cache[key] = value
        else:
            file_cache = {}
        file_cache[key] = value
        self.update_file(file_cache)
67460
def set_custom_values(self, key, values):
        
        for value in values:
            self.set_custom_value(key, value)
333865
def set(self, key, value):
        
        # the configuration changes, so we invalidate the cached config
        self._full_config = None
        self._override[key] = value
751295
def __inner_set_default(self, key, value):
        
        path = self.__path_of(key)

        try:
            # Try to get and return the existing node with its data
            value, _ = self.connection.retry(self.connection.get, path)
            return self.encoding.decode(value)
        except self.no_node_error:
            # Node does not exist, we have to create it
            self.connection.retry(self.connection.create, path, self.encoding.encode(value))
            self.__increment_last_updated()
            return value
511873
public void setValue(String key, String value) {
        KeyValue kv = getKV(key);
        if (kv != null) {
            kv.setValue(value);
        } else if (key != null) {
            map.add(new KeyValue(key,value));
        }
    }
851456
def set(self, key, value, *args, **kwargs):
        
        if self.cfg.jsonpickle:
            value = jsonpickle.encode(value)
        return self.conn.set(key, value, *args, **kwargs)
138371
def set_param(self, key, value):
        
        self.__dict__[key] = value
        self._parameters[key] = value
674308
def set(self, key, value):
        
        return self.__setitem__(key, value, force=True)
984777
def add_key_value(self, key, value):
        
        if key == 'unique_id':
            self._unique_id = str(value)
        else:
            self._data[key] = value
1133333
def add_default(self, key: str, value: Optional[str], default_type: type = str) -> None:
        
        self.defaults[key] = HierarkeyDefault(value, default_type)
727956
def set(self, key, value):
        
        if self._component.get(key, raw=True) != value:
            self._component[key] = value
            self._main_config.dirty = True
975384
function(key, value) {
    switch (utils.typeOf(key)) {
      case 'object':
        this.visit('option', key);
        break;
      case 'array':
      case 'string':
        if (typeof value === 'undefined') {
          return this.either(key, utils.get(this.defaults, key));
        }
        this.emit('option', key, value);
        utils.set(this.options, key, value);
        break;
      default: {
        throw new TypeError('expected key to be a string, object or array');
      }
    }
    return this;
  }
247465
def add(self, key: str, value: str):
        
        if key in self:
            # Use super to get mutable set
            super().__getitem__(key).add(value)
        else:
            self[key] = {value}