bpo-41870: Avoid the test when nargs=0 (GH-22462)
![](https://secure.gravatar.com/avatar/cc7737cd64a84f1b5c61a160798e97ee.jpg?s=120&d=mm&r=g)
https://github.com/python/cpython/commit/fa7ce080175f65d678a7d5756c94f82887f... commit: fa7ce080175f65d678a7d5756c94f82887fc9803 branch: master author: Dong-hee Na <donghee.na92@gmail.com> committer: GitHub <noreply@github.com> date: 2020-10-01T13:50:40+09:00 summary: bpo-41870: Avoid the test when nargs=0 (GH-22462) files: M Objects/boolobject.c diff --git a/Objects/boolobject.c b/Objects/boolobject.c index ab7669cb240de..b786966533e1d 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c @@ -72,9 +72,9 @@ bool_vectorcall(PyObject *type, PyObject * const*args, assert(PyType_Check(type)); if (nargs) { ok = PyObject_IsTrue(args[0]); - } - if (ok < 0) { - return NULL; + if (ok < 0) { + return NULL; + } } return PyBool_FromLong(ok); }
participants (1)
-
Dong-hee Na