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

Andrew Koenig ark-mlist at att.net
Fri May 18 17:51:58 CEST 2007


> 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.

Presumably you can still write to the standard input, output, error, and log
files without importing io.

(I'm feeling slightly pedantic today, so I want to say that the proposal
doesn't make it any easier to identify modules that engage in I/O -- it
makes it easier to identify modules that assuredly do not engage in I/O.  +1
anyway.)




More information about the Python-3000 mailing list