error handling when opening files

Chris Angelico rosuav at gmail.com
Tue Jul 8 12:35:53 CEST 2014


On Tue, Jul 8, 2014 at 7:00 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> Interestingly, did you know that even *closing* a file can fail?

I know that can happen with SSL sockets (which can require writing and
reading). Can't think of any situations on normal file systems where
that's true, unless the actual failure is in the flushing of buffers;
technically, that's not a failure of closing, but it could be a
failure that's detected on close(). Is that what you're thinking of?

ChrisA



More information about the Python-list mailing list