mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Issue 6573: Fix set.union() for cases where self is in the argument chain.
This commit is contained in:
parent
7bc66b1009
commit
63853bbdc4
3 changed files with 8 additions and 1 deletions
|
|
@ -1187,7 +1187,7 @@ set_union(PySetObject *so, PyObject *args)
|
|||
for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
|
||||
other = PyTuple_GET_ITEM(args, i);
|
||||
if ((PyObject *)so == other)
|
||||
return (PyObject *)result;
|
||||
continue;
|
||||
if (set_update_internal(result, other) == -1) {
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue