summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-12-02 21:39:56 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-12-02 21:39:56 (GMT)
commit4954f9fcab59e38f2229998b3276567d4bf92b53 (patch)
tree5f0e1732e20489b9a6843ba6e742e9a84a393c49 /Modules
parentb16edc8087586699e775d6fa6b20d750e9916fff (diff)
downloadcpython-4954f9fcab59e38f2229998b3276567d4bf92b53.zip
cpython-4954f9fcab59e38f2229998b3276567d4bf92b53.tar.gz
cpython-4954f9fcab59e38f2229998b3276567d4bf92b53.tar.bz2
Issue #17401: Output the closefd attribute as boolean.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/fileio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 5c1316e..80af83a 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -1055,13 +1055,13 @@ fileio_repr(fileio *self)
else
return NULL;
res = PyUnicode_FromFormat(
- "<_io.FileIO fd=%d mode='%s' closefd='%d'>",
- self->fd, mode_string(self), self->closefd);
+ "<_io.FileIO fd=%d mode='%s' closefd=%s>",
+ self->fd, mode_string(self), self->closefd ? "True" : "False");
}
else {
res = PyUnicode_FromFormat(
- "<_io.FileIO name=%R mode='%s' closefd='%d'>",
- nameobj, mode_string(self), self->closefd);
+ "<_io.FileIO name=%R mode='%s' closefd=%s>",
+ nameobj, mode_string(self), self->closefd ? "True" : "False");
Py_DECREF(nameobj);
}
return res;