On Sep 5, 2:47 pm, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: (snip) > > Finally, I was under the impression that Python closed filehandles > > automatically when they were garbage-collected. (In fact (3) > > suggests as much, since it does not include an implicit call to > > fh.close.) If so, the difference between (1) and (3) does not seem > > very big. What am I missing here?
True, but i find the with statement (while quite useful in general practice) is not a "cure all" for situations that need and exception caught. In that case the laborious finger wrecking syntax of "f.close ()" must be painstaking typed letter by painful letter. f-.-c-l-o-s-e-(-) It's just not fair ;-( -- http://mail.python.org/mailman/listinfo/python-list