diff options
author | Alex Martelli <aleaxit@gmail.com> | 2003-10-25 23:22:55 (GMT) |
---|---|---|
committer | Alex Martelli <aleaxit@gmail.com> | 2003-10-25 23:22:55 (GMT) |
commit | b34ac7371cdc9f269f2f77e24dd1c22fa157d4e4 (patch) | |
tree | 812a428604fbf9c23e48fdd319bf84739dd7d3ae | |
parent | c12859d6cbc1fe2e0134304ed33fd0474ffbe2ef (diff) | |
download | cpython-b34ac7371cdc9f269f2f77e24dd1c22fa157d4e4.zip cpython-b34ac7371cdc9f269f2f77e24dd1c22fa157d4e4.tar.gz cpython-b34ac7371cdc9f269f2f77e24dd1c22fa157d4e4.tar.bz2 |
regressing the performance bugfix -- Guido wants the performance bug left
alone, because there can be no guarantee re the semantics of += vs + .
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Python/bltinmodule.c | 2 |
2 files changed, 1 insertions, 4 deletions
@@ -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 ----------------- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 22d728e..e10d16b 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; |