[Python-3000] Radical idea: remove built-in open (require import io)
Chris Monson
shiblon at gmail.com
Fri May 18 02:58:49 CEST 2007
On 5/17/07, Guido van Rossum <guido at python.org> wrote:
>
> On 5/17/07, Chris Monson <shiblon at gmail.com> wrote:
> > Would other IO builtins also move, like (formerly raw_) input and
> > print? What about the file type?
>
> The file type is already gone in py3k.
>
> > it seems to me that if the rationale is to make use of IO
> > identifiable, then all IO functions would have to move into the io
> > module. What am I missing?
>
> I guess a refinement of the point is that you need the io module to
> create new I/O streams, while input() and print() act on existing
> streams. Code that makes read() and write() calls doesn't need to
> import the io module either, so we're not really making all I/O
> identifiable, just the open() calls.
Aha. Of course, now that you say all of that, it seems obvious. :-)
- C
--Guido
>
> > - C
> >
> > On 5/17/07, Guido van Rossum <guido at python.org> wrote:
> > > Do people think it would be too radical if the built-in open()
> > > function was removed altogether, requiring all code that opens files
> > > to import the io module first? This would make it easier to identify
> > > modules that engage in I/O.
> > >
> > > --
> > > --Guido van Rossum (home page: http://www.python.org/~guido/)
> > > _______________________________________________
> > > Python-3000 mailing list
> > > Python-3000 at python.org
> > > http://mail.python.org/mailman/listinfo/python-3000
> > > Unsubscribe:
> > > http://mail.python.org/mailman/options/python-3000/shiblon%40gmail.com
> > >
> >
>
>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070517/d45f58cd/attachment.html
More information about the Python-3000
mailing list