From: Guido van Rossum Date: Thu, 4 Apr 2002 01:00:42 +0000 (+0000) Subject: As Neal pointed out, bool_print was an order of magnitude too complex. X-Git-Tag: v2.3c1~6149 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=645a22e007a7e5b6da110cc5c5696d336b4c41c6;p=thirdparty%2FPython%2Fcpython.git As Neal pointed out, bool_print was an order of magnitude too complex. --- diff --git a/Objects/boolobject.c b/Objects/boolobject.c index fc5c4ca47315..3953af640b38 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c @@ -7,18 +7,7 @@ static int bool_print(PyBoolObject *self, FILE *fp, int flags) { - if (flags & Py_PRINT_RAW) { - if (self->ob_ival == 0) - fputs("False", fp); - else - fputs("True", fp); - } - else { - if (self->ob_ival == 0) - fputs("False", fp); - else - fputs("True", fp); - } + fputs(self->ob_ival == 0 ? "False" : "True", fp); return 0; }