On 5/22/14 10:29 AM, Paul Moore wrote:
On 22 May 2014 14:24, Ned Batchelder <ned@nedbatchelder.com> wrote:
When this came up 18 months ago on Python-Dev, it was part of a thread about
adding more optimizations to CPython.  Guido said "+1" to the idea of being
able to disable the optimizers
(https://mail.python.org/pipermail/python-dev/2012-December/123099.html).
Our need is not as great as C's, the unrecognizability of the compiled code
is much less, but current optimizations are already interfering with the
ability to debug and analyze code, and new optimizations will only broaden
the possibility of interference.
So I'm a bit confused. This was debated on python-dev and (presumably)
agreement reached, so why does it need a whole new thread here?

Paul
I would not say the idea was debated.  You can read the (short) thread here: https://mail.python.org/pipermail/python-dev/2012-December/123022.html .  Mark Shannon proposed emitting different bytecode for while loops and some other constructs.  Guido said no PEP was needed.  Nick Coghlan said "main challenge is to keep stepping through the code with pdb sane" (I agree with that!). I said it would be good to have a way to disable optimizations, Guido said "+1".

I put this idea here because the discussion on issue2506 got involved enough that someone suggested this was the right place for it. I linked to Guido's sentiment in my initial post here, and had hoped that he would chime in.

--Ned.