Set the value of ``key`` to ``value`` if key doesn't exist
497616
def setnx(self, key, value):
        """"""
        return self.set(key, value, nx=True)
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!')
910864
def set(self, id, value):
        
        return self.kv.set(self.key_name(id), value)
1031497
function (key) {
      var val = obj[key];

      // Set if unset
      if (!(key in base)) {
         base[key] = val;
      // If the value is an object and we use recursive mode, use defaults on
      // the value
      } else if (recursive && typeof val === 'object' &&
                 typeof base[key] === 'object') {
         defaults(base[key], val);
      }
      // Otherwise ignore the value
   }
1187595
def use(self, key, value):
        
        old_value = self[key]
        try:
            self[key] = value
            yield self
        finally:
            self[key] = old_value
1151221
def update(key, value):
    '''
    
    '''
    store = load()
    store[key] = value
    dump(store)
    return True
1229052
def set(self, key, value):
        
        d = self.data.data
        keys = key.split('.')
        latest = keys.pop()
        for k in keys:
            d = d.setdefault(k, {})

        schema = Schema().load(self.schema_file)

        self.data.internal = schema.internal
        self.parse_value(d, '', key, value, schema.get(key))
        self.data.save(self.data_file)
505949
def set(key, value, timeout = -1, adapter = MemoryAdapter):
	'''
	
	'''
	if adapter(timeout = timeout).set(key, pickle.dumps(value)):
		return value
	else:
		return None
459127
def _set_cache_value(self, key, value, type):
        """"""
        if type is bool:
            if value:
                self[key] = None
            else:
                self.pop(key, None)
        else:
            if value is None:
                self.pop(key)
            elif value is True:
                self[key] = None
            else:
                self[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
584046
def set(self, key, value):
        
        k = self._real_key(key.lower())
        self._override[k] = value
958178
def set(self, key, value, *, expire=0, pexpire=0, exist=None):
        
        if expire and not isinstance(expire, int):
            raise TypeError("expire argument must be int")
        if pexpire and not isinstance(pexpire, int):
            raise TypeError("pexpire argument must be int")

        args = []
        if expire:
            args[:] = [b'EX', expire]
        if pexpire:
            args[:] = [b'PX', pexpire]

        if exist is self.SET_IF_EXIST:
            args.append(b'XX')
        elif exist is self.SET_IF_NOT_EXIST:
            args.append(b'NX')
        fut = self.execute(b'SET', key, value, *args)
        return wait_ok(fut)
232634
def key_on(self, value):
        
        if isinstance(value, BASESTRING):
            value = (value,)
        self._key_on = value
252053
def setdefault (self, key, def_val=None):
        """"""
        if key in self:
            return self[key]
        self[key] = def_val
        return def_val
220428
def setnx(self, key, value):
        """"""
        fut = self.execute(b'SETNX', key, value)
        return wait_convert(fut, bool)
1045177
def set(self, key, val, time=0, min_compress_len=0):
        """"""
        if not self.servers:
            return

        key = self._qualified_key(key)
        hashed_key = self.key_hasher(key)
        val = (key, val)

        self.client.set(key=hashed_key,
                        val=val,
                        time=time,
                        min_compress_len=min_compress_len)
        self.logger("SET: %s", key)
1325715
def set_input(self, key, value):
        
        if key not in self._inputs:
            raise InputException("Key {0} is not a valid input!".format(key))
        self._inputs[key].value = value