Commit a2777d3a authored by Alex Martelli's avatar Alex Martelli

Changed builtin_sum to use PyNumber_InPlaceAdd (same semantics, but fixes

a performance bug in sum(manylists)), same as in 2.3 maintenance branch.
parent 5cf6394b
......@@ -1840,7 +1840,7 @@ builtin_sum(PyObject *self, PyObject *args)
}
break;
}
temp = PyNumber_Add(result, item);
temp = PyNumber_InPlaceAdd(result, item);
Py_DECREF(result);
Py_DECREF(item);
result = temp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment