]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport fix for SF #522274 from trunk.
authorJeremy Hylton <jeremy@alum.mit.edu>
Fri, 19 Apr 2002 22:58:11 +0000 (22:58 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Fri, 19 Apr 2002 22:58:11 +0000 (22:58 +0000)
Lib/compiler/transformer.py

index cd36aaeac9a137bff762f5e5a29ecb45f723f09d..96422b0856f5ff2dcf7273ac207fdc8f5e335140 100644 (file)
@@ -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])