diff options
-rw-r--r-- | Lib/compiler/transformer.py | 6 | ||||
-rw-r--r-- | Tools/compiler/compiler/transformer.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 9c8b32e..18ec815 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -993,9 +993,9 @@ class Transformer: n = n[1] if n[0] != token.NAME: raise SyntaxError, "keyword can't be an expression (%s)"%n[0] - n = Node('keyword', n[1], result) - n.lineno = result.lineno - return 1, n + node = Node('keyword', n[1], result) + node.lineno = n[2] + return 1, node def com_subscriptlist(self, primary, nodelist, assigning): # slicing: simple_slicing | extended_slicing diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py index 9c8b32e..18ec815 100644 --- a/Tools/compiler/compiler/transformer.py +++ b/Tools/compiler/compiler/transformer.py @@ -993,9 +993,9 @@ class Transformer: n = n[1] if n[0] != token.NAME: raise SyntaxError, "keyword can't be an expression (%s)"%n[0] - n = Node('keyword', n[1], result) - n.lineno = result.lineno - return 1, n + node = Node('keyword', n[1], result) + node.lineno = n[2] + return 1, node def com_subscriptlist(self, primary, nodelist, assigning): # slicing: simple_slicing | extended_slicing |