parameters: (self, key, value, save=True)
docstring: Set a UserPref value.
  		Also saves the object.
docstring_summary: Set a UserPref value.
  		Also saves the object.
docstring_tokens: Set a UserPref value . Also saves the object .
function: def set_userpref(self, key, value, save=True):
  		"""
  		Set a UserPref value.
  		Also saves the object.
  		
  		"""
  		d = self.get_data()
  		prefs = d.setdefault("userprefs", {})
  		
  		prefs[key] = value
  		
  		self.set_data(d)
  		
  		if save:
  			self.save()
function_tokens: def set_userpref ( self , key , value , save = True ) : d = self . get_data ( ) prefs = d . setdefault ( "userprefs" , { } ) prefs [ key ] = value self . set_data ( d ) if save : self . save ( )