]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Speedup set.update by using the override mode for PyDict_Merge().
authorRaymond Hettinger <python@rcn.com>
Mon, 15 Dec 2003 21:16:06 +0000 (21:16 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 15 Dec 2003 21:16:06 +0000 (21:16 +0000)
Objects/setobject.c

index 4fbb645458f21ed5c091b64f22d7c4c46eecd377..6070fb6b812a2b0b1cda3c889e8ae47488f382d7 100644 (file)
@@ -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;
        }