[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:
Jeremy Hylton 2001-04-11 16:36:25 +00:00
parent d91bbba89d
commit 01d12937df
2 changed files with 2 additions and 0 deletions

View File

@ -495,6 +495,7 @@ class CodeGenerator:
# misc # misc
def visitDiscard(self, node): def visitDiscard(self, node):
self.set_lineno(node)
self.visit(node.expr) self.visit(node.expr)
self.emit('POP_TOP') self.emit('POP_TOP')

View File

@ -495,6 +495,7 @@ class CodeGenerator:
# misc # misc
def visitDiscard(self, node): def visitDiscard(self, node):
self.set_lineno(node)
self.visit(node.expr) self.visit(node.expr)
self.emit('POP_TOP') self.emit('POP_TOP')