summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-04-11 16:36:25 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-04-11 16:36:25 (GMT)
commit01d12937dfe827810b716625ce297ace44a3a6d2 (patch)
treeaceee5e8661d1c633338951d38f5d0b0bf7465ea /Lib
parentd91bbba89d214d809d355ded386363cf6ee29f15 (diff)
downloadcpython-01d12937dfe827810b716625ce297ace44a3a6d2.zip
cpython-01d12937dfe827810b716625ce297ace44a3a6d2.tar.gz
cpython-01d12937dfe827810b716625ce297ace44a3a6d2.tar.bz2
[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')
-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 3f5ef89..904d066 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')