Steve Howell schrieb: > --- Guillaume Proux <[EMAIL PROTECTED]> wrote: > >> On 5/23/07, Steve Howell <[EMAIL PROTECTED]> >> wrote: >> > 17.7% of the files I searched have calls to >> open(). >> >> My understand is that the mythical "python 2.x -> >> 3.0" tool will >> automatically migrate your code by using the AST to >> find all >> references to "open" and when finding one, add the >> correct import and >> replace the open by the io.open call >> > > Agreed, but my concern isn't the conversion itself. I > just want open() to stay as a builtin. In simple > throwaway programs I appreciate the convenience, and > in larger programs I appreciate not having to > context-switch from the problem at hand to put an > "import" at the top.
ISTM that many modules using open() do also use os.path utilities to create the filename given to open(). In that case, you have an import statement in any case. Georg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com