Michael Hoffman wrote:
That said, I still use file() instead of open(). I think that:

for line in file("mytext.txt"):

makes a lot more sense than:

for line in open("mytext.txt"):

I guess it's because the first option sounds a lot more like English.

Call me a space-waster (or a "waste of space" ;-) but I still prefer this one to either of the above:

file = open('mytext.txt')
for line in file:
   ...


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

Reply via email to