Skip to content

Commit 5f6be1f

Browse files
committed
slight change to ADT repr
Recurse into tuple args when printing. This looks better especially for empty tuples, which show up a lot as clauses in If statements.
1 parent a761de8 commit 5f6be1f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adt.py

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def qstr(x):
6969
return '0x{0:x}'.format(x)
7070
elif isinstance(x, ADT):
7171
return str(x)
72+
elif isinstance(x, tuple):
73+
return "(" + ", ".join(qstr(i) for i in x) + ")"
7274
else:
7375
return '"{0}"'.format(x)
7476
def args():

0 commit comments

Comments
 (0)