mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Add lineno attributes to Discard nodes
This commit is contained in:
parent
5af105eec9
commit
4c1f42733c
2 changed files with 6 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue