[Python-Dev] Silencing IO errors on del/dealloc? (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Sun Feb 22 23:46:41 CET 2009


Guido van Rossum <guido python.org> writes:

If you want to ensure buffers are flushed, why not call self.flush() for writable files outside the try/except? If flush() fails it is a real problem.

Well, my concern is less about flushing writable files (they will be implemented in C and the flushing will probably be ok) than Python-written file-like types, like SocketIO or any third-party class.

Anyway, let's keep silencing exceptions and we'll see if anyone complains about it.

Regards

Antoine.



More information about the Python-Dev mailing list