Thanks for these detailed explanation. Both statements will close file 
automatically sooner or later and, when considering the exceptions, "with" is 
better. Hope my understanding is right.

But, just curious, how do you know the "for" will do it? I can't find any 
document about it from every sources I know. Very depressed:-(

--Jach
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to