Chris Hengge wrote:
> Not to hijack the thread, but what stops you from just putting a
> file.close()
> after your example line?

Because file is a class.
file(filename) creates a file object, but he's not saving the object to
a variable, so its lost. file.close() takes a file object as a
parameter, but theres no object left to pass it.

HTH.
-Jordan Greenberg

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to