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 = []
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])