diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-04-11 16:36:25 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-04-11 16:36:25 (GMT) |
commit | 01d12937dfe827810b716625ce297ace44a3a6d2 (patch) | |
tree | aceee5e8661d1c633338951d38f5d0b0bf7465ea /Lib/compiler/pycodegen.py | |
parent | d91bbba89d214d809d355ded386363cf6ee29f15 (diff) | |
download | cpython-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/compiler/pycodegen.py')
-rw-r--r-- | Lib/compiler/pycodegen.py | 1 |
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') |