summaryrefslogtreecommitdiffstats
path: root/Lib/compiler
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-04-19 22:58:11 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-04-19 22:58:11 (GMT)
commit3b016b130f421eaf17bcd1986d9f8b3b60160ebe (patch)
tree713b16563334ff6008b7d9b38b2082dc077c4455 /Lib/compiler
parent9b6e538d7f18a1f144227c46041b15e7a2aeba5b (diff)
downloadcpython-3b016b130f421eaf17bcd1986d9f8b3b60160ebe.zip
cpython-3b016b130f421eaf17bcd1986d9f8b3b60160ebe.tar.gz
cpython-3b016b130f421eaf17bcd1986d9f8b3b60160ebe.tar.bz2
Backport fix for SF #522274 from trunk.
Diffstat (limited to 'Lib/compiler')
-rw-r--r--Lib/compiler/transformer.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index cd36aae..96422b0 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])