On Fri, May 23, 2014 at 10:08 AM, Donald Stufft
On May 23, 2014, at 12:49 PM, Guido van Rossum
wrote: I'm not happy with the direction this is taking. I would prefer an approach that *first* implements the minimal thing (an internal flag, set by an environment variable, to disable the peephole optimizer) and *then* perhaps revisits the greater UI for specifying optimization levels and the consequences this has for pyc/pyo files.
I agree with this I think.
I would also like to remind people the reason why there are separate pyc and pyo files: they are separate to support precompilation of the standard library and installed 3rd party packages for different optimization levels.
Sadly enough it doesn’t go far enough since you can’t have (as far as I know) a .pyo for both -O and -OO. Perhaps the PEP isn’t the worst idea in order to make all of that work with the __pycache__ directories and the pyc tagging.
Agreed (though I think that -OO is a very niche feature) and I think deciding on what to do about this (if anything) should not hold the peephole disabling feature hostage. (The latter of course has to decide what to do about pyc files, but the should be a suitable answer that doesn't require solving the general problem nor prevents the general problem being solved.) -- --Guido van Rossum (python.org/~guido)