Message333988
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:44 | scotchka | set | recipients:
+ scotchka, serhiy.storchaka, ppperry, xtreak |
2019-01-18 16:31:42 | scotchka | set | messageid: <1547829102.96.0.0119995792663.issue34782@roundup.psfhosted.org> |
2019-01-18 16:31:42 | scotchka | link | issue34782 messages |
2019-01-18 16:31:42 | scotchka | create | |
|