(self, func, weight=0.5)
Used to clear all functions in the slot and add one

      :param func: the function to be added in the slot
      :param weight: used when you enable the *random apply*, it's the weight
                     of the function for the random selection

      .. versionadded:: 0.6
         The `weight` parameter.

      .. note:: the method *set* of the function slot remove all previous
                functions added to the slot.
Used to clear all functions in the slot and add one
Used to clear all functions in the slot and add one
def set(self, func, weight=0.5):
      """ Used to clear all functions in the slot and add one

      :param func: the function to be added in the slot
      :param weight: used when you enable the *random apply*, it's the weight
                     of the function for the random selection

      .. versionadded:: 0.6
         The `weight` parameter.

      .. note:: the method *set* of the function slot remove all previous
                functions added to the slot.
      """
      self.clear()
      self.__typeCheck(func)
      self.add(func, weight)
def set ( self , func , weight = 0.5 ) : self . clear ( ) self . __typeCheck ( func ) self . add ( func , weight )