Kaydet (Commit) 4c1f4273 authored tarafından Jeremy Hylton's avatar Jeremy Hylton

Add lineno attributes to Discard nodes

üst 5af105ee
......@@ -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):
......
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment