From 645a22e007a7e5b6da110cc5c5696d336b4c41c6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 4 Apr 2002 01:00:42 +0000 Subject: As Neal pointed out, bool_print was an order of magnitude too complex. --- Objects/boolobject.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Objects/boolobject.c b/Objects/boolobject.c index fc5c4ca..3953af6 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; } -- cgit v0.12