]> granicus.if.org Git - python/commitdiff
regressing the performance bugfix -- Guido wants the performance bug left
authorAlex Martelli <aleaxit@gmail.com>
Sat, 25 Oct 2003 23:24:14 +0000 (23:24 +0000)
committerAlex Martelli <aleaxit@gmail.com>
Sat, 25 Oct 2003 23:24:14 +0000 (23:24 +0000)
alone, because there can be no guarantee re the semantics of += vs + .

Misc/NEWS
Python/bltinmodule.c

index f47113ccaf5a296477130ab3198ac88ec4b20669..74096c0289539213531ae5023b6665a796fdddb1 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -47,9 +47,6 @@ Core and builtins
 - obj.__contains__() now returns True/False instead of 1/0.  SF patch
   820195.
 
-- builtin_sum() now uses PyNumber_InPlaceAdd, fixing a previous
-  performance bug for sum(list_of_lists) and similar cases.
-
 Extension modules
 -----------------
 
index 718b603b7d27c206fd02f05394d5b47abf3e2b1d..0309f1de55997af0928c5969d71104f228b21f05 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;