[Python-3000] Radical idea: remove built-in open (require import io)

Baptiste Carvello baptiste13 at altern.org
Sun May 20 16:19:14 CEST 2007

Georg Brandl a écrit :
> Baptiste Carvello schrieb:
>> Guido van Rossum a écrit :
>>> 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.
>> -1
>> Will someone think of the interactive users ?
> They can still put "import sys, os, io" in their PYTHONSTARTUP file.
Thanks, I had forgotten that possibility.

> Or use IPython.
Well, I have to say that I'm a bit worried with a current trend on python-dev,
to answer any question about interactive use with pointing to IPython. I *love*
IPython. I'm using it a lot. But sometimes, because of the longer startup time,
or because you want to stay close to "normal" python, you prefer to use the
standard interpreter. And I believe this should really stay an *supported* use.

Of course, on this specific case, I understand a trade-off has to be made.


More information about the Python-3000 mailing list