[Python-Dev] Banishing apply(), buffer(), coerce(), and intern()

Guido van Rossum guido at python.org
Sat Nov 29 13:17:00 EST 2003


> But... at [0], raw_input() and input() are mentioned as minor regrets,
> as functions which should actually not have been builtins. Have you now
> changed your mind, or did I misinterpret [0], or is it something else?
> 
> [0] http://www.python.org/doc/essays/ppt/regrets/PythonRegrets.pdf

Note that the regrets were minor. :-)

The problem is that these are almost never used in real programs; real
programs use sys.stdin.readline() so they can properly handle EOF.

But their main use, teaching Python to beginners without having to
expose the whole language first, requires either that they are built
in or that the teacher sets up a special environment for their
students.  For the latter, a PYTHONSTARTUP variable pointing to a file
with teachers' additions does nicely, but requires a level of control
over the student's environment that's not always realistic.
(Especially not when the student is teaching herself. :-)

Perhaps a special module of teacher's helpers could be devised, and a
special Python invocation to include that automatically?

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list