[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-13 Thread Brett Cannon
Brett Cannon added the comment: It's something that could potentially be changed in the future, but no one has prioritized it enough to worry about it. Typically this opens a pandora's box of wanting to generalize it so it supports custom user optimizations as well and then people lose

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Matthew Fernandez
New submission from Matthew Fernandez: Perhaps others wouldn't consider this a bug, but it was definitely surprising to me. When switching between optimisation levels -OO (optimise and strip docstrings) and -O (just optimise), you will find the docstrings are still stripped. E.g. $ ls

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Not really intentional, it's just a limitation of the current implementation (where the same .pyo files are used for both -O and -OO). Already reported as issue1538778 (which was closed as won't fix). -- nosy: +barry, pitrou superseder: - pyo's are

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Matthew Fernandez
Matthew Fernandez added the comment: Ah thanks, Antoine. Sorry, failed to find that issue in my prior searching. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21489 ___