Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74278

Re: error handling when opening files

References <mailman.11616.1404796682.18130.python-list@python.org> <53bbb33b$0$2926$c3e8da3$76491128@news.astraweb.com>
Date 2014-07-09 21:59 +0200
Subject Re: error handling when opening files
From Alex Burke <alexjeffburke@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11712.1404935998.18130.python-list@python.org> (permalink)

Show all headers | View raw


> Interestingly, did you know that even *closing* a file can fail?

No I didn't, interesting piece on information for sure! I thought close() is
usually made to always succeed regardless if it actually hosed up. Any
idea what the context manager will do in that case? (I ask as that
else-with form looks vulnerable in that case but may not be).

Thanks!

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

error handling when opening files Alex Burke <alexjeffburke@gmail.com> - 2014-07-08 01:49 +0200
  Re: error handling when opening files Marko Rauhamaa <marko@pacujo.net> - 2014-07-08 11:30 +0300
  Re: error handling when opening files Steven D'Aprano <steve@pearwood.info> - 2014-07-08 09:00 +0000
    Re: error handling when opening files Chris Angelico <rosuav@gmail.com> - 2014-07-08 20:35 +1000
    Re: error handling when opening files Alex Burke <alexjeffburke@gmail.com> - 2014-07-09 21:59 +0200
  Re: error handling when opening files wxjmfauth@gmail.com - 2014-07-08 02:38 -0700

csiph-web