mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
Speedup set.update by using the override mode for PyDict_Merge().
This commit is contained in:
parent
eebb641f23
commit
81ad32e435
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue