This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ericp
Recipients benjamin.peterson, ericp, georg.brandl, ncoghlan
Date 2013-05-15.20:32:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368649951.77.0.961146083925.issue17971@psf.upfronthosting.co.za>
In-reply-to
Content
I found a workaround in our debugger code, so you can lower the priority on this, or even mark it "Wontfix", although I still
think the frame stack is getting messed up.

One thing about our debugger, it essentially runs all the Python code in a big exec statement, and this particular code contains its own exec stmt.  The stack looks wrong after we finish the inner exec statement.
So if you're looking for a repro, that might be the way to go.  However
I can break at line 10 in the following code with no problem using pdb (Py 3):

     1  #!/usr/bin/env python3
     2
     3  def inner_f(a, b):
     4      ns2 = {"c": 7, "a":a, "b":b, "tot":None }
     5      exec("tot = a + b + 1 + 100 * c", ns2)
     6      return ns2['tot']
     7
     8  ns1 = {"c": 5, "inner_f": inner_f, "res":None }
     9  exec("res = inner_f(3, 4) + 10 * c", ns1)
    10  print("After all that, res: %d" % (ns1['res'],))
    11  print("Stop here")
History
Date User Action Args
2013-05-15 20:32:31ericpsetrecipients: + ericp, georg.brandl, ncoghlan, benjamin.peterson
2013-05-15 20:32:31ericpsetmessageid: <1368649951.77.0.961146083925.issue17971@psf.upfronthosting.co.za>
2013-05-15 20:32:31ericplinkissue17971 messages
2013-05-15 20:32:31ericpcreate