[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
|
@ -495,6 +495,7 @@ class CodeGenerator:
|
|||
# misc
|
||||
|
||||
def visitDiscard(self, node):
|
||||
self.set_lineno(node)
|
||||
self.visit(node.expr)
|
||||
self.emit('POP_TOP')
|
||||
|
||||
|
|
|
@ -495,6 +495,7 @@ class CodeGenerator:
|
|||
# misc
|
||||
|
||||
def visitDiscard(self, node):
|
||||
self.set_lineno(node)
|
||||
self.visit(node.expr)
|
||||
self.emit('POP_TOP')
|
||||
|
||||
|
|
Loading…
Reference in New Issue