mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
[finishing fix from earlier checkins]
Call set_lineno() in visitDiscard(), which will generate linenos for discard statements, e.g. the statement "1/0" Fixes SF bug #409587
This commit is contained in:
parent
d91bbba89d
commit
01d12937df
2 changed files with 2 additions and 0 deletions
|
@ -495,6 +495,7 @@ class CodeGenerator:
|
|||
# misc
|
||||
|
||||
def visitDiscard(self, node):
|
||||
self.set_lineno(node)
|
||||
self.visit(node.expr)
|
||||
self.emit('POP_TOP')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue