Deprecate input()
Steve Holden
sholden at holdenweb.com
Tue Apr 16 10:26:10 EDT 2002
"Alex Martelli" <aleax at aleax.it> wrote in ...
> Magnus Lie Hetland wrote:
> ...
> >>I think the best name for what's now raw_input might be something
> >>like getline.
> >
> > Or perhaps readline (à la file.readline)?
>
> I slightly prefer getline, because raw_input differs from a
> somefile.readline -- the latter does not strip off the '\n',
> while raw_input does -- each of the two slightly different
> behaviors being optimal in its context. I think it would be
> harder to teach if the names coincided.
>
There's also the minor difference that raw_input() takes an argument to be
used as an interactive prompt!
regards
Steve
More information about the Python-list
mailing list