Skip to content

Commit c50a356

Browse files
committed
Rarest case goes last
1 parent d624835 commit c50a356

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/exceptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2710,10 +2710,10 @@ AttributeError_str(PyObject *op)
27102710
Py_BEGIN_CRITICAL_SECTION(self);
27112711
if (
27122712
!self->obj || !self->name || !PyUnicode_Check(self->name)
2713-
|| PyTuple_GET_SIZE(self->args) > 1
27142713
|| (PyTuple_GET_SIZE(self->args) == 1
27152714
&& PyUnicode_Check(arg = PyTuple_GET_ITEM(self->args, 0))
27162715
&& !PyUnicode_Equal(arg, self->name))
2716+
|| PyTuple_GET_SIZE(self->args) != 0
27172717
) {
27182718
ret = BaseException_str(op);
27192719
}

0 commit comments

Comments
 (0)