Mercurial > cpython-lru_cache-weakref
diff Objects/setobject.c @ 55467:b34cae786cb0 3.1
Issue 6573: Fix set.union() for cases where self is in the argument chain.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Mon, 27 Jul 2009 20:29:18 +0000 |
| parents | 87fbbf22adf3 |
| children | ed59077838ad 8d48f9b59689 |
line wrap: on
line diff
--- a/Objects/setobject.c Mon Jul 27 02:12:11 2009 +0000 +++ b/Objects/setobject.c Mon Jul 27 20:29:18 2009 +0000 @@ -1187,7 +1187,7 @@ 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;
