[Python-3000] Pre-PEP: Simple input built-in in Python 3000
ironfroggy at gmail.com
Sun Dec 24 02:24:28 CET 2006
On 12/23/06, Guido van Rossum <guido at python.org> wrote:
> On 12/23/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> > Guido van Rossum wrote:
> > > But they typically aren't used to entering EOF either; EOF is not
> > > exactly a typical input in an interactive program, and having to enter
> > > it typically means you're talking to a Unix utility that's not really
> > > designed for interactive use.
> > the progression I had in mind was
> > 1. literals, simple operations, printing the result
> > 2. reading input from the console, simple operations, printing
> > the result
> > 3. reading input from a file, simple operations, printing the
> > result
> > the jump between 2 and 3 is a bit too large in today's Python.
> > another way to address that would be to add standard input and output
> > *objects* (which delegates to sys.stdin/stdout) to the builtin name-
> > space; after all:
> > input.readline()
> > is pretty self-documenting, even if you don't really understand dotted
> > notation just yet.
> I don't see a strong connection between reading from interactive input
> and reading from a file. Reading from input interactively is more
> similar to accepting user input from a GUI than reading data from a
> file. One of the first interactive sessions in a beginner's program is
> the guess-a-number game ("Is it larger than 10?" etc.). This just
> doesn't have an analogy with reading files.
> --Guido van Rossum (home page: http://www.python.org/~guido/)
I was reading the thread and wanted to make a comment about the "input
from a GUI". It should be noted that whatever the names of these
functions, or their allowed parameters, etc., the idea of them being
more than console IO should be allowed for. The builtins should be
easily redefinable when you run a script (at least optionally, in the
future) to use a simply prompt GUI and dialogs, etc. Even if the
script was written without such in mind.
Is this too much to consider?
Read my blog! I depend on your acceptance of my opinion! I am interesting!
More information about the Python-3000