summaryrefslogtreecommitdiff
path: root/Lib/compiler
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-04-11 16:36:25 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2001-04-11 16:36:25 +0000
commit563a27ba78cb9cd168c4364c5a26bcb69c46165b (patch)
tree0e5fe5b0656905130bea49a840c3df9fd747e40e /Lib/compiler
parentab45966dbd1d5c7a7e0a0cab82ac831454edc3d8 (diff)
downloadcpython-563a27ba78cb9cd168c4364c5a26bcb69c46165b.tar.gz
[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
Diffstat (limited to 'Lib/compiler')
-rw-r--r--Lib/compiler/pycodegen.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index 3f5ef890d9..904d066974 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -495,6 +495,7 @@ class CodeGenerator:
# misc
def visitDiscard(self, node):
+ self.set_lineno(node)
self.visit(node.expr)
self.emit('POP_TOP')