New submission from James Abbatiello <abb...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue6250> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com