diff options
Diffstat (limited to 'Lib/compiler/transformer.py')
-rw-r--r-- | Lib/compiler/transformer.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index b05d3a8..32a4160 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -746,9 +746,8 @@ class Transformer: def com_arglist(self, nodelist): # varargslist: - # (fpdef ['=' test] ',')* ('*' NAME [',' ('**'|'*' '*') NAME] - # | fpdef ['=' test] (',' fpdef ['=' test])* [','] - # | ('**'|'*' '*') NAME) + # (fpdef ['=' test] ',')* ('*' NAME [',' '**' NAME] | '**' NAME) + # | fpdef ['=' test] (',' fpdef ['=' test])* [','] # fpdef: NAME | '(' fplist ')' # fplist: fpdef (',' fpdef)* [','] names = [] @@ -767,12 +766,10 @@ class Transformer: i = i + 3 if i < len(nodelist): - # should be DOUBLESTAR or STAR STAR + # should be DOUBLESTAR t = nodelist[i][0] if t == token.DOUBLESTAR: node = nodelist[i+1] - elif t == token.STARSTAR: - node = nodelist[i+2] else: raise ValueError, "unexpected token: %s" % t names.append(node[1]) |