diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-16 22:42:17 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-16 22:42:17 -0500 |
| commit | a05f7822b10ed4cdd61ed8384299a003baf1c1c6 (patch) | |
| tree | 28ec9e0efa0cb5c7f335579271c61a2f910680f9 /python/step2_eval.py | |
| parent | b3402a82d38d0d59b91b117005c6bef2748acf8b (diff) | |
| download | mal-a05f7822b10ed4cdd61ed8384299a003baf1c1c6.tar.gz mal-a05f7822b10ed4cdd61ed8384299a003baf1c1c6.zip | |
Python: metadata on builtin funcs. Support python3.
Diffstat (limited to 'python/step2_eval.py')
| -rw-r--r-- | python/step2_eval.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/step2_eval.py b/python/step2_eval.py index e50d231..a5061dc 100644 --- a/python/step2_eval.py +++ b/python/step2_eval.py @@ -48,7 +48,7 @@ def REP(str): repl_env['+'] = lambda a,b: a+b repl_env['-'] = lambda a,b: a-b repl_env['*'] = lambda a,b: a*b -repl_env['/'] = lambda a,b: a/b +repl_env['/'] = lambda a,b: int(a/b) while True: try: @@ -58,4 +58,4 @@ while True: print(REP(line)) except reader.Blank: continue except Exception as e: - print "".join(traceback.format_exception(*sys.exc_info())) + print("".join(traceback.format_exception(*sys.exc_info()))) |
