Anonymous file closing

Sergey Krushinsky lunarium at comail.ru
Fri Jun 11 09:59:58 CEST 2004


Hello all,

If I need to read a string from a file and use syntax like:
text = open(filename, 'r').read()
...
is the file object ever closed?

With best regards,
Sergey




More information about the Python-list mailing list