Deprecate input()

Alex Martelli aleax at aleax.it
Mon Apr 15 03:05:59 EDT 2002


Raymond Hettinger wrote:

> The help and tutor maillists indicate that the use of input() rather than
> raw_input() is widespread.  I think this function is so harmful and so
> likely to be used that it should be deprecated hasta pronto (right away).
> When really needed, eval(raw_input()) is easy enough to code and explicit
> about what it does.
> 
> <no wink -- this function needs to go away>

Seconded.  'input' is an attractive nuisance (technical term of law, I 
believe) for novices.  The earliest phases of teaching Python would
be easier if using input started giving a warning, looking forwards to
eventual removal.


Alex




More information about the Python-list mailing list