aboutsummaryrefslogtreecommitdiff
path: root/python/step3_env.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/step3_env.py')
-rw-r--r--python/step3_env.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/step3_env.py b/python/step3_env.py
index 21879d6..f684274 100644
--- a/python/step3_env.py
+++ b/python/step3_env.py
@@ -62,7 +62,7 @@ def _ref(k,v): repl_env.set(k, v)
_ref('+', lambda a,b: a+b)
_ref('-', lambda a,b: a-b)
_ref('*', lambda a,b: a*b)
-_ref('/', lambda a,b: a/b)
+_ref('/', lambda a,b: int(a/b))
while True:
try:
@@ -72,4 +72,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())))