As Neal pointed out, bool_print was an order of magnitude too complex.

This commit is contained in:
Guido van Rossum 2002-04-04 01:00:42 +00:00
parent b5080abbbe
commit 645a22e007
1 changed files with 1 additions and 12 deletions

View File

@ -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;
}