aboutsummaryrefslogtreecommitdiff
path: root/python/printer.py
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-01-06 20:58:33 -0600
committerJoel Martin <github@martintribe.org>2015-01-09 16:16:56 -0600
commitd706ed5041f3b8eb90692d72d5e8db1a67cc7200 (patch)
treefa21d063ea63efb56dbd6fd0e3a247a87ae96bfd /python/printer.py
parent47930f746366d5730170e817ad233e8c3e020270 (diff)
downloadmal-d706ed5041f3b8eb90692d72d5e8db1a67cc7200.tar.gz
mal-d706ed5041f3b8eb90692d72d5e8db1a67cc7200.zip
Python: fix python3 support with keywords.
Diffstat (limited to 'python/printer.py')
-rw-r--r--python/printer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/printer.py b/python/printer.py
index 78a2fcf..98e3e90 100644
--- a/python/printer.py
+++ b/python/printer.py
@@ -12,7 +12,7 @@ def _pr_str(obj, print_readably=True):
ret.extend((_pr_str(k), _pr_str(obj[k],_r)))
return "{" + " ".join(ret) + "}"
elif types._string_Q(obj):
- if len(obj) > 0 and obj[0] == u'\u029e':
+ if len(obj) > 0 and obj[0] == types.u('\u029e'):
return ':' + obj[1:]
elif print_readably:
return '"' + obj.encode('unicode_escape').decode('latin1').replace('"', '\\"') + '"'