We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ExceptionGroup
1 parent 79dd615 commit e9fec3dCopy full SHA for e9fec3d
1 file changed
Objects/exceptions.c
@@ -1070,11 +1070,13 @@ BaseExceptionGroup_repr(PyObject *op)
1070
assert(self->msg);
1071
assert(self->excs);
1072
1073
+ /* Use the actual exceptions tuple for accuracy, but make it look like the
1074
+ * original exception sequence, if possible, for backwards compatibility. */
1075
PyObject* excs_orig = PyTuple_GET_ITEM(self->args, 1);
1076
if (PyList_Check(excs_orig)) {
1077
excs_orig = PySequence_List(self->excs);
1078
} else {
- Py_INCREF(excs_orig);
1079
+ excs_orig = Py_NewRef(self->excs);
1080
}
1081
1082
const char *name = _PyType_Name(Py_TYPE(self));
0 commit comments