[Python-Dev] Generated Bytecode ...

Meador Inge meadori at gmail.com
Sun Nov 1 17:00:49 EST 2015


On Fri, Oct 23, 2015 at 3:23 AM, Victor Stinner
<victor.stinner at gmail.com> wrote:

> Note: I propose "noopt" because we already have "optimization level 0"
> which still uses optimizations, it's the default mode. It's different
> than gcc -O0 which really disables all optimizations. I already prefix
> the "noopt" suffix for .pyc files than "opt--1" proposed by Brett in
> http://bugs.python.org/issue2506

Strictly speaking, this isn't completely true.  Most (all?) C/C++
compilers do some level of optimization when they are "disabled".
GCC/Clang, for example, both will do some form of constant folding
with -O0.  The compilers are just *much* less aggressive with the
primary goal of making the debugging experience much more enjoyable.

The situation here sounds similar -- we want an option to provide a
better debugging and tracing experience, which seems like a very
reasonable idea to me.

-- Meador


More information about the Python-Dev mailing list