[Python-3000] Radical idea: remove built-in open (require import io)
steven.bethard at gmail.com
Fri May 18 18:54:05 CEST 2007
Guido van Rossum 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.
> 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.
+0.5. I'm all for keeping the builtins as simple as possible. And if
you're already used to importing io for file, when you discover you
need to do something more complicated involving other layers of the io
stack, you'll already be looking in the right place.
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
More information about the Python-3000