diff options
Diffstat (limited to 'Tools/compiler')
-rw-r--r-- | Tools/compiler/compiler/transformer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py index d32812a..10d0e51 100644 --- a/Tools/compiler/compiler/transformer.py +++ b/Tools/compiler/compiler/transformer.py @@ -272,7 +272,9 @@ class Transformer: # augassign testlist | testlist ('=' testlist)* exprNode = self.com_node(nodelist[-1]) if len(nodelist) == 1: - return Discard(exprNode) + n = Discard(exprNode) + n.lineno = exprNode.lineno + return n if nodelist[1][0] == token.EQUAL: nodes = [] for i in range(0, len(nodelist) - 2, 2): |