From a253e183b807c8108f984758d2b1365bef977e6b Mon Sep 17 00:00:00 2001 From: Alex Martelli Date: Sat, 25 Oct 2003 23:24:14 +0000 Subject: regressing the performance bugfix -- Guido wants the performance bug left alone, because there can be no guarantee re the semantics of += vs + . --- Misc/NEWS | 3 --- Python/bltinmodule.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index f47113c..74096c0 100644 --- 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 ----------------- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 718b603..0309f1de 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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; -- cgit v0.12