summaryrefslogtreecommitdiffstats
path: root/Tools/parser
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-03-18 17:48:58 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-03-18 17:48:58 (GMT)
commitcda75be02a79686a8e634576600814271536bc1a (patch)
treeb456968bae7bcdebceb833e7b13dae163d732d36 /Tools/parser
parentc45e041bff4a5f9aa137dcd4933c72a9221cd7d5 (diff)
downloadcpython-cda75be02a79686a8e634576600814271536bc1a.zip
cpython-cda75be02a79686a8e634576600814271536bc1a.tar.gz
cpython-cda75be02a79686a8e634576600814271536bc1a.tar.bz2
unify some ast.argument's attrs; change Attribute column offset (closes #16795)
Patch from Sven Brauch.
Diffstat (limited to 'Tools/parser')
-rw-r--r--Tools/parser/unparse.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py
index 28b2d5b..837cd81 100644
--- a/Tools/parser/unparse.py
+++ b/Tools/parser/unparse.py
@@ -518,10 +518,10 @@ class Unparser:
else: self.write(", ")
self.write("*")
if t.vararg:
- self.write(t.vararg)
- if t.varargannotation:
+ self.write(t.vararg.arg)
+ if t.vararg.annotation:
self.write(": ")
- self.dispatch(t.varargannotation)
+ self.dispatch(t.vararg.annotation)
# keyword-only arguments
if t.kwonlyargs:
@@ -537,10 +537,10 @@ class Unparser:
if t.kwarg:
if first:first = False
else: self.write(", ")
- self.write("**"+t.kwarg)
- if t.kwargannotation:
+ self.write("**"+t.kwarg.arg)
+ if t.kwarg.annotation:
self.write(": ")
- self.dispatch(t.kwargannotation)
+ self.dispatch(t.kwarg.annotation)
def _keyword(self, t):
self.write(t.arg)