diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 03b0705c1d4..e6decaa0a83 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -55,7 +55,7 @@ math_error() else if (errno == ERANGE) err_setstr(OverflowError, "math range error"); else - err_errno(RuntimeError); + err_errno(ValueError); /* Unexpected math error */ return NULL; }