diff options
Diffstat (limited to 'Objects/boolobject.c')
-rw-r--r-- | Objects/boolobject.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Objects/boolobject.c b/Objects/boolobject.c index 0300f7b..f43e26f 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c @@ -20,13 +20,7 @@ bool_repr(PyObject *self) PyObject *PyBool_FromLong(long ok) { - PyObject *result; - - if (ok) - result = Py_True; - else - result = Py_False; - return Py_NewRef(result); + return ok ? Py_True : Py_False; } /* We define bool_new to always return either Py_True or Py_False */ |