Fredrik Lundh wrote:

>     try with opening(file) as f:
>         body
>     except IOError:
>         deal with the error (you have to do this anyway)

You don't usually want to do it right *there*, though.
More likely you'll have something further up that deals
with a variety of possible errors.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,          | A citizen of NewZealandCorp, a       |
Christchurch, New Zealand          | wholly-owned subsidiary of USA Inc.  |
[EMAIL PROTECTED]          +--------------------------------------+
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to