def test_value ( self , value ) : if not isinstance ( value , float ) : raise ValueError ( 'expected float value: ' + str ( type ( value ) ) )
check if value is an instance of float python
Test if value is an instance of float .
def test_value(self, value):
        """Test if value is an instance of float."""
        if not isinstance(value, float):
            raise ValueError('expected float value: ' + str(type(value)))