"T" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Do I need to close the file in this case?  Why or why not?
>
> for line in file('foo', 'r'):
>   print line

Are you asking if you can get away without closing it?
Or are you asking if it is a good idea to not close it?

Good programming practice says that if you open it - you close it.

And stay out of trouble ;-)
Thomas Bartkus


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to