Implement eval.

This commit is contained in:
Damien George
2014-01-15 22:14:03 +00:00
parent e2fb2baaa4
commit d02c6d8962
9 changed files with 76 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
# builtin eval
eval('1 + 2')
eval('1 + 2\n')
eval('1 + 2\n\n#comment\n')
x = 4
eval('x')
eval('lambda x: x + 10')(-5)
y = 6
eval('lambda: y * 2')()