simple eval question
mwh at python.net
Mon Nov 5 18:03:42 CET 2001
nbecker at fred.net (N Becker) writes:
> What is wrong with this?
> eval ("print \"hello\"')
print is a statement. eval evaluates an expression.
You could try
exec "print 'hello'"
I've reinvented the idea of variables and types as in a
programming language, something I do on every project.
-- Greg Ward, September 1998
More information about the Python-list