summaryrefslogtreecommitdiffstats
path: root/Tools/parser/unparse.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/parser/unparse.py')
-rw-r--r--Tools/parser/unparse.py27
1 files changed, 5 insertions, 22 deletions
diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py
index 258c648..0c1cc5f 100644
--- a/Tools/parser/unparse.py
+++ b/Tools/parser/unparse.py
@@ -211,16 +211,6 @@ class Unparser:
if comma: self.write(", ")
else: comma = True
self.dispatch(e)
- if t.starargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("*")
- self.dispatch(t.starargs)
- if t.kwargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("**")
- self.dispatch(t.kwargs)
self.write(")")
self.enter()
@@ -450,16 +440,6 @@ class Unparser:
if comma: self.write(", ")
else: comma = True
self.dispatch(e)
- if t.starargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("*")
- self.dispatch(t.starargs)
- if t.kwargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("**")
- self.dispatch(t.kwargs)
self.write(")")
def _Subscript(self, t):
@@ -543,8 +523,11 @@ class Unparser:
self.dispatch(t.kwarg.annotation)
def _keyword(self, t):
- self.write(t.arg)
- self.write("=")
+ if t.arg is None:
+ self.write("**")
+ else:
+ self.write(t.arg)
+ self.write("=")
self.dispatch(t.value)
def _Lambda(self, t):