Deprecate input()

Denis S. Otkidach ods at fep.ru
Mon Apr 15 05:59:27 EDT 2002


On Sun, 14 Apr 2002, Raymond Hettinger wrote:

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

Certanly.  I was wondered to see input() documented as function
that accept only integer input (but not evaluate it!) in Russian
translation of Andre S. Lessa's "Developer's Handbook" (I do not
know if this bug is in original book too).






More information about the Python-list mailing list