Closed cartr closed 11 years ago
Sorry I didn't see this earlier. We should actually avoid using/promoting/talking about input()
. If we do talk about it, we should tell people to avoid it. It is a security hole and dangerous enough to be removed in 3.0 -- raw_input()
is renamed to and replaces input()
. (If people want the same functionality, then they can explicitly do an eval(input())
in 3.x.
We should explain the difference between
raw_input
andinput
(one returns a string, the other converts to a number). I've added an example that demonstrates that the return value ofinput("How old are you? ")
is a number by adding 1 to it.