Mercurial > cpython-lru_cache-weakref
diff Objects/setobject.c @ 31203:bfa0369d6760 legacy-trunk
Speedup set.update by using the override mode for PyDict_Merge().
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Mon, 15 Dec 2003 21:16:06 +0000 |
| parents | e4682af7aea9 |
| children | bf8402a56fa4 |
line wrap: on
line diff
--- a/Objects/setobject.c Mon Dec 15 19:46:09 2003 +0000 +++ b/Objects/setobject.c Mon Dec 15 21:16:06 2003 +0000 @@ -15,7 +15,7 @@ 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; }
