Who uses input()? [was Re: question on "input"]

Terry Hancock hancock at anansispaceworks.com
Thu Jul 14 13:40:13 EDT 2005


On Thursday 14 July 2005 07:00 am, Michael Hoffman wrote:
> Devan L wrote:
> > Use raw_input instead. It returns a string of whatever was typed. Input
> > expects a valid python expression.
> 
> Who actually uses this? It's equivalent to eval(raw_input(prompt)) but 
> causes a lot of newbie confusion. Python-dev archives revealed that 
> someone tried to get this deprecated but Guido disagreed.

I don't think it should disappear, but it *does* seem more sensible for
"raw_input" to be called "input" (or "readstring" or some such thing) and
"input" to vanish into greater obscurity as "eval_input" or something.

Unfortunately, that would break code if anything relied on "input", so I
guess that would be a Py3K idea, and maybe the whole I/O concept
will be rethought then (if the "print" statement is going to go away,
anyway).

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list