On Fri, Apr 22, 2011 at 4:22 PM, harrismh777 <[email protected]> wrote:
> now we get this for input():
>
> raw_input("prompt>") --> string
I would have to say that the 2.x behaviour of input() is a mistake
that's being corrected in 3.x. With a simple name like input(), it
should do something simple and straightforward - not eval() the
expression.
> to: a = eval(input("enter a number > "))
Uhhhh.... NO. NO NO NO. What if someone enters "os.exit()" as their
number? You shouldn't eval() unchecked user input!
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list