[docs] io.FileIO closefd parameter is not documented nor shown in repr (issue 17401)

robertc at robertcollins.net robertc at robertcollins.net
Mon Oct 20 23:50:16 CEST 2014


http://bugs.python.org/review/17401/diff/13116/Modules/_io/fileio.c
File Modules/_io/fileio.c (right):

http://bugs.python.org/review/17401/diff/13116/Modules/_io/fileio.c#newcode1059
Modules/_io/fileio.c:1059: self->fd, mode_string(self), self->closefd ?
"" : " closefd=False");
So this will work, but its more complex for folk to reason about.

http://bugs.python.org/review/17401/diff/13116/Modules/_io/fileio.c#newcode1064
Modules/_io/fileio.c:1064: nameobj, mode_string(self), self->closefd ?
"" : " closefd=False");
OTOH this code path here may make sense to hide closefd altogether,
since closefd cannot be specified with file names (rather than fds) -
its always treated as True.

http://bugs.python.org/review/17401/


More information about the docs mailing list