Issue 6573: Fix set.union() for cases where self is in the argument chain.

This commit is contained in:
Raymond Hettinger 2009-07-27 20:29:18 +00:00
parent 7bc66b1009
commit 63853bbdc4
3 changed files with 8 additions and 1 deletions

View file

@ -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;