diff --git a/Numeric/simpleFunctionPython.h b/Numeric/simpleFunctionPython.h
index a2ecbaddf3627ca961ff99fd02efd517f79b6897..b88b07ee1a2f056a6f8469a8d83f82a14a624211 100644
--- a/Numeric/simpleFunctionPython.h
+++ b/Numeric/simpleFunctionPython.h
@@ -28,7 +28,7 @@ class simpleFunctionPython : public simpleFunction<double> {
     double r = 0;
     if (result) {
       int ok = PyArg_Parse(result, "d", &r);
-      if (not ok)
+      if (ok == 0)
         Msg::Error("The python function did not return a double.");
       Py_DECREF(result);
     }