Used to 'file = open(...)', now what?

Grzegorz Adam Hankiewicz gradha at titanium.sabren.com
Wed May 7 16:40:48 EDT 2003


I'm very used to the following construct:

  file = open("whatever", flags)
  buf = file.readlines()
  file.close()

But with Python 2.2 file() is a builtin constructor, making open
deprecated, possibly dropped in a future version. Now what would
be the "usual" way to name file variables without hiding the
constructor?

-- 
 Please don't send me private copies of your public answers. Thanks.





More information about the Python-list mailing list