[Python-Dev] Silencing IO errors on del/dealloc?

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Feb 22 21:07:27 CET 2009


Antoine Pitrou wrote:

> I would like to change this behaviour so that the "try/except" enclosure above
> is removed, letting __del__ at least print those (unraisable) errors on the
> console. Of course I also advocate doing so in the C version of the IO lib.

I would hope that the C version could at least ensure that
buffers are flushed properly without having to rely on any
global variables, so that this would not be so much of an
issue.

When we were using stdio, we could rely on the C runtime
to flush buffers unless something very drastic has gone
wrong. Bypassing stdio means we are taking that
responsibility on ourselves.

-- 
Greg


More information about the Python-Dev mailing list