diff options
author | Guido van Rossum <guido@python.org> | 2002-04-04 01:00:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-04-04 01:00:42 (GMT) |
commit | 645a22e007a7e5b6da110cc5c5696d336b4c41c6 (patch) | |
tree | 2cf16d0a78ffdc16174fca73a73b8a7a284184b4 /Objects/boolobject.c | |
parent | b5080abbbe41ca3ae3b67334734d6443a0c03b15 (diff) | |
download | cpython-645a22e007a7e5b6da110cc5c5696d336b4c41c6.zip cpython-645a22e007a7e5b6da110cc5c5696d336b4c41c6.tar.gz cpython-645a22e007a7e5b6da110cc5c5696d336b4c41c6.tar.bz2 |
As Neal pointed out, bool_print was an order of magnitude too complex.
Diffstat (limited to 'Objects/boolobject.c')
-rw-r--r-- | Objects/boolobject.c | 13 |
1 files changed, 1 insertions, 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; } |