mirror of https://github.com/python/cpython.git
Add lineno attributes to Discard nodes
This commit is contained in:
parent
5af105eec9
commit
4c1f42733c
|
@ -272,7 +272,9 @@ def expr_stmt(self, nodelist):
|
|||
# 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 @@ def expr_stmt(self, nodelist):
|
|||
# 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):
|
||||
|
|
Loading…
Reference in New Issue