When you read a file with that method, is there an implied close() call on the file? I assume there is, but how is that handled?

Caleb Hattingh wrote:
Peter, that was very clear, thanks.


So not only is

for line in file(...):
  # do stuff

the most elegant, it is also the fastest. file.readlines() comes

close, but

is only viable for "small" files.



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

Reply via email to