diff options
-rw-r--r-- | Lib/compiler/transformer.py | 4 | ||||
-rw-r--r-- | Tools/compiler/compiler/transformer.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 2fb442a..63aac83 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -893,7 +893,9 @@ class Transformer: return Node('ass_list', assigns) def com_assign_name(self, node, assigning): - return Node('ass_name', node[1], assigning) + n = Node('ass_name', node[1], assigning) + n.lineno = node[2] + return n def com_assign_trailer(self, primary, node, assigning): t = node[1][0] diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py index 2fb442a..63aac83 100644 --- a/Tools/compiler/compiler/transformer.py +++ b/Tools/compiler/compiler/transformer.py @@ -893,7 +893,9 @@ class Transformer: return Node('ass_list', assigns) def com_assign_name(self, node, assigning): - return Node('ass_name', node[1], assigning) + n = Node('ass_name', node[1], assigning) + n.lineno = node[2] + return n def com_assign_trailer(self, primary, node, assigning): t = node[1][0] |