Henry Chen <taha...@gmail.com> added the comment:
Hmm, the example works for me (Python 3.6.5): >>> import pdb >>> class FakeContainer: ... def __getitem__(self, key): ... raise KeyError(key) ... >>> pdb.run("eval('1+1',{},FakeContainer())") > <string>(1)<module>() (Pdb) c >>> As for exec/eval accepting an incomplete mapping, that strikes me as a less than thorough checking on the part of exec/eval, perhaps for performance reasons(?) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34782> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com