code: def Set(self, key, value):
          
          if not value == None: self.prefs[key] = value
          else:                 self.prefs.pop(key)
  
          self.Dump()
docs: Sets the key-value pair and dumps to the preferences file.