summaryrefslogtreecommitdiff
path: root/canonicalize/display.py
diff options
context:
space:
mode:
Diffstat (limited to 'canonicalize/display.py')
-rw-r--r--canonicalize/display.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/canonicalize/display.py b/canonicalize/display.py
index 174304f..5b8aa72 100644
--- a/canonicalize/display.py
+++ b/canonicalize/display.py
@@ -185,7 +185,7 @@ def printFunction(a, indent=0):
s += printFunction(a.operand, indent) + ")"
elif t == ast.Lambda:
s += "lambda "
- s += printFunction(a.arguments, indent) + ": "
+ s += printFunction(a.args, indent) + ": "
s += printFunction(a.body, indent)
elif t == ast.IfExp:
s += "(" + printFunction(a.body, indent)
@@ -359,7 +359,7 @@ def printFunction(a, indent=0):
if (len(a.args) > 0 or a.vararg != None or a.kwarg != None or len(a.kwonlyargs) > 0):
s = s[:-2]
elif t == ast.arg:
- s += a.arg
+ s += a.arg.s if isinstance(a.arg, ast.Str) else a.arg
if a.annotation != None:
s += ": " + printFunction(a.annotation, indent)
elif t == ast.keyword:
@@ -567,4 +567,4 @@ def formatNode(node):
elif t == list:
return formatList(node, None)
else:
- return printFunction(node, 0) \ No newline at end of file
+ return printFunction(node, 0)