[New-bugs-announce] [issue6250] Python compiles dead code
James Abbatiello
report at bugs.python.org
Wed Jun 10 05:59:45 CEST 2009
New submission from James Abbatiello <abbeyj at gmail.com>:
Python currently emits bytecode for code that is unreachable (e.g.
following a return statement). This doesn't hurt anything but it takes
up space doing nothing.
This patch attempts to avoid generating any bytecode in this situation.
There's an optional warning, enabled with the -r command line switch,
which notifies you if any unreachable code is found. Running
regrtest.py with this switch produces a bit of noise but also revealed
issue6227 which looks like a real bug.
----------
components: Interpreter Core
files: deadcode.patch
keywords: patch
messages: 89183
nosy: abbeyj, collinwinter, jyasskin, pitrou
severity: normal
status: open
title: Python compiles dead code
versions: Python 2.7
Added file: http://bugs.python.org/file14252/deadcode.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6250>
_______________________________________
More information about the New-bugs-announce
mailing list