From: Raymond Hettinger Date: Mon, 15 Dec 2003 21:16:06 +0000 (+0000) Subject: Speedup set.update by using the override mode for PyDict_Merge(). X-Git-Tag: v2.4a1~1084 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=81ad32e43591bbc93af14da030b0946a896270f4;p=thirdparty%2FPython%2Fcpython.git Speedup set.update by using the override mode for PyDict_Merge(). --- diff --git a/Objects/setobject.c b/Objects/setobject.c index 4fbb645458f2..6070fb6b812a 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -15,7 +15,7 @@ set_update(PySetObject *so, PyObject *other) PyObject *item, *data, *it; if (PyAnySet_Check(other)) { - if (PyDict_Merge(so->data, ((PySetObject *)other)->data, 0) == -1) + if (PyDict_Merge(so->data, ((PySetObject *)other)->data, 1) == -1) return NULL; Py_RETURN_NONE; }