]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
regressing the performance bugfix -- Guido wants the performance bug left
authorAlex Martelli <aleaxit@gmail.com>
Sat, 25 Oct 2003 23:22:55 +0000 (23:22 +0000)
committerAlex Martelli <aleaxit@gmail.com>
Sat, 25 Oct 2003 23:22:55 +0000 (23:22 +0000)
alone, because there can be no guarantee re the semantics of += vs + .

Misc/NEWS
Python/bltinmodule.c

index 0fd01965015355f2eb1b5642e6ddb382e44ff986..7b010f1eadbb0c91d92ae556e3164f214e21fda9 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,9 +15,6 @@ Core and builtins
 - Patch #820195: object.__contains__() now returns True or False instead
   of 1 or 0.
 
-- builtin_sum() now uses PyNumber_InPlaceAdd, fixing a previous
-  performance bug for sum(list_of_lists) and similar cases.
-
 Extension modules
 -----------------
 
index 22d728e60fa70b7998bfb00a8fb3d0822fa691d1..e10d16ba65f416742f4c5828ffec838bbd7977f6 100644 (file)
@@ -1840,7 +1840,7 @@ builtin_sum(PyObject *self, PyObject *args)
                        }
                        break;
                }
-               temp = PyNumber_InPlaceAdd(result, item);
+               temp = PyNumber_Add(result, item);
                Py_DECREF(result);
                Py_DECREF(item);
                result = temp;