Used to 'file = open(...)', now what?
Ulrich Petri
ulope at gmx.de
Thu May 8 19:36:22 EDT 2003
"Grzegorz Adam Hankiewicz" <gradha at titanium.sabren.com> schrieb im
Newsbeitrag news:mailman.1052340133.18435.python-list at python.org...
> 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?
>
what about:
some_other_name_for_a_file_var = open('dsfsdf','r')
????
Did you mean that question?
Ciao Ulrich
More information about the Python-list
mailing list