diff options
Diffstat (limited to 'Lib/compiler/transformer.py')
-rw-r--r-- | Lib/compiler/transformer.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 7b1e31c..dc88222 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -831,17 +831,11 @@ class Transformer: i = i + 3 else: # no vararg assert node[0] == token.COMMA - i += 1 - #elif node[0] == token.COMMA: - # i += 1 - # kwonlyargs, skip = self.keywordonlyargs(nodelist[i:]) - # i += skip - if nodelist[i][0] == token.NAME: + i += 2 + if i < len(nodelist) and nodelist[i][0] == token.NAME: kwonlyargs, skip = self.keywordonlyargs(nodelist[i:]) i += skip - print "kwonlyargs:", kwonlyargs - if i < len(nodelist): # should be DOUBLESTAR t = nodelist[i][0] @@ -869,7 +863,6 @@ class Transformer: # skip the comma i = i + 1 - print "names:", names, "defaults:", defaults, "kwonlyargs:", kwonlyargs, "flags:", flags return names, defaults, kwonlyargs, flags def com_fpdef(self, node): |