Author scotchka
Recipients ppperry, scotchka, serhiy.storchaka, xtreak
Date 2019-01-18.16:31:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
An attempt to clarify the issue in my own mind:

def foo():
    # import pdb; pdb.set_trace()
    exec('pass', {}, FakeContainer())

This function runs successfully. But if you uncomment the pdb line and then step thru in the pdb console, there is an Exception.

I *think* the underlying principle is that code that runs normally should also run under pdb, which this example violates. However, to adhere to the principle 100% could be a very steep technical cost.

Alternatively, I'd argue that the function should NOT run even without pdb, since exec requires a (complete) mapping type according to the documentation. Perhaps the thing to do is to add more stringent type checking to exec and eval?
Date User Action Args
2019-01-18 16:31:44scotchkasetrecipients: + scotchka, serhiy.storchaka, ppperry, xtreak
2019-01-18 16:31:42scotchkasetmessageid: <>
2019-01-18 16:31:42scotchkalinkissue34782 messages
2019-01-18 16:31:42scotchkacreate