On Fri, Dec 13, 2013 at 2:04 AM, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
> I much prefer Chris Angelico's response "The input() function in Python 2.x
> is a very dangerous one - it's equivalent to eval(input()) in Python 3."

Just to clarify: If you *want* eval, then you know you want it, and
you are (or should be) aware of its dangers. The problem, imo, is
hiding something as powerful and dangerous as code evaluation behind
the innocuous name "input". If I were coding a Python 2.x REPL, I
would probably write eval(raw_input()) rather than input(), just for
clarity.

But I'm more likely to just code for Python 3 anyway. :)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to