Sara Khalatbari wrote: > Dear friends > In a code, I'm opening a file to read. Like : > lines = open(filename).readlines() > & I'm never closing it. > I'm not writing in that file, I just read it. > > Will it cause any problems if you open a file to read > & never close it? > >
Under CPython the filehandle will be automatically garbage collected. Under JPython (Jython) it won't be... It's a very useful shortcut though *sigh* Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml > > > __________________________________ > Do you Yahoo!? > Make Yahoo! your home page > http://www.yahoo.com/r/hs -- http://mail.python.org/mailman/listinfo/python-list