1 parent 733e26a commit af1b4c9Copy full SHA for af1b4c9
1 file changed
Python/bltinmodule.c
@@ -1840,7 +1840,7 @@ builtin_sum(PyObject *self, PyObject *args)
1840
}
1841
break;
1842
1843
- temp = PyNumber_Add(result, item);
+ temp = PyNumber_InPlaceAdd(result, item);
1844
Py_DECREF(result);
1845
Py_DECREF(item);
1846
result = temp;
0 commit comments