[Python-3000] python 3 closes sys.stdout
Victor Stinner
victor.stinner at haypocalc.com
Mon Aug 27 00:11:21 CEST 2007
On Sunday 26 August 2007 23:23:37 Amaury Forgeot d'Arc wrote:
> internal_close(PyFileIOObject *self)
> {
> int save_errno = 0;
> - if (self->fd >= 0) {
> + if (self->fd >= 3) {
> int fd = self->fd;
> self->fd = -1;
> Py_BEGIN_ALLOW_THREADS
Hum, a before fix would be to add an option to choose if the file should be
closed or not on object destruction.
Victor Stinner aka haypo
http://hachoir.org/
More information about the Python-3000
mailing list