diff options
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()))) |
