[Python-ideas] Python-ideas Digest, Vol 90, Issue 30
Chris Angelico
rosuav at gmail.com
Thu May 22 15:05:51 CEST 2014
On Thu, May 22, 2014 at 10:50 PM, Thomas Heller <theller at ctypes.org> wrote:
> Am 22.05.2014 10:52, schrieb Antoine Pitrou:
>
>> The use case for disabling optimizations in C is to make programs
>> actually debuggable. Python doesn't have that problem.
>
>
> Well, setting a breakpoint to the 'continue' line in Ned's test code
> and running it with pdb does NOT trigger the breakpoint.
> So 'Python doesn't have this problem' is not really true.
Correct me if I'm wrong, but as I understand it, the problem is that
the peephole optimizer eliminated an entire line of code. Would it be
possible to have it notice when it merges two pieces from different
lines, and somehow mark that the resulting bytecode comes from both
lines? That would solve the breakpoint and coverage problems
simultaneously.
ChrisA
More information about the Python-ideas
mailing list