Speedup set.update by using the override mode for PyDict_Merge().

This commit is contained in:
Raymond Hettinger 2003-12-15 21:16:06 +00:00
parent eebb641f23
commit 81ad32e435

View 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;
}