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.
1 parent d624835 commit c50a356Copy full SHA for c50a356
1 file changed
Objects/exceptions.c
@@ -2710,10 +2710,10 @@ AttributeError_str(PyObject *op)
2710
Py_BEGIN_CRITICAL_SECTION(self);
2711
if (
2712
!self->obj || !self->name || !PyUnicode_Check(self->name)
2713
- || PyTuple_GET_SIZE(self->args) > 1
2714
|| (PyTuple_GET_SIZE(self->args) == 1
2715
&& PyUnicode_Check(arg = PyTuple_GET_ITEM(self->args, 0))
2716
&& !PyUnicode_Equal(arg, self->name))
+ || PyTuple_GET_SIZE(self->args) != 0
2717
) {
2718
ret = BaseException_str(op);
2719
}
0 commit comments