def set_float ( self , option , value ) : if not isinstance ( value , float ) : raise TypeError ( "Value must be a float" ) self . options [ option ] = value
how to specify a float number python
Set a float option .
def set_float(self, option, value):
        """Set a float option.

            Args:
                option (str): name of option.
                value (float): value of the option.

            Raises:
                TypeError: Value must be a float.
        """
        if not isinstance(value, float):
            raise TypeError("Value must be a float")
        self.options[option] = value