05-09-2009 r <rt8...@gmail.com> wrote:

i find the with statement (while quite useful in general
practice) is not a "cure all" for situations that need and exception
caught.

In what sense?

I think that:

   with open(...) as f:
      foo...

is equivalent to:

   f = open(...)
   try:
       foo...
   finally:
       f.close()

Obviously it doesn't substitute catching with 'except', but I don't
see how it could disturb that.

Cheers,
*j

--
Jan Kaliszewski (zuo) <z...@chopin.edu.pl>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to