From 7956447091d8107a73b11c6ccf14a464c1c8be22 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Tue, 19 Sep 2023 08:28:38 +0300 Subject: [PATCH] Fix typo in sumprod() --- Modules/mathmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index d5cc1d8f09e6ef..e479cad5e12d2b 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -2823,7 +2823,7 @@ math_sumprod_impl(PyObject *module, PyObject *p, PyObject *q) PyErr_Clear(); goto finalize_flt_path; } - } else if (q_type_float && (PyLong_CheckExact(p_i) || PyBool_Check(q_i))) { + } else if (q_type_float && (PyLong_CheckExact(p_i) || PyBool_Check(p_i))) { flt_q = PyFloat_AS_DOUBLE(q_i); flt_p = PyLong_AsDouble(p_i); if (flt_p == -1.0 && PyErr_Occurred()) {