aboutsummaryrefslogtreecommitdiff
path: root/python/step3_env.py
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-16 22:42:17 -0500
committerJoel Martin <github@martintribe.org>2014-04-16 22:42:17 -0500
commita05f7822b10ed4cdd61ed8384299a003baf1c1c6 (patch)
tree28ec9e0efa0cb5c7f335579271c61a2f910680f9 /python/step3_env.py
parentb3402a82d38d0d59b91b117005c6bef2748acf8b (diff)
downloadmal-a05f7822b10ed4cdd61ed8384299a003baf1c1c6.tar.gz
mal-a05f7822b10ed4cdd61ed8384299a003baf1c1c6.zip
Python: metadata on builtin funcs. Support python3.
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())))