Skip to content

Commit a7a1955

Browse files
corona10Seth Sims
authored and
Seth Sims
committed
bpo-41870: Avoid the test when nargs=0 (pythonGH-22462)
1 parent 175ff10 commit a7a1955

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Objects/boolobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ bool_vectorcall(PyObject *type, PyObject * const*args,
7272
assert(PyType_Check(type));
7373
if (nargs) {
7474
ok = PyObject_IsTrue(args[0]);
75-
}
76-
if (ok < 0) {
77-
return NULL;
75+
if (ok < 0) {
76+
return NULL;
77+
}
7878
}
7979
return PyBool_FromLong(ok);
8080
}

0 commit comments

Comments
 (0)