Steven D'Aprano added the comment:
> The footnote about why eval/exec cannot be used for arbitrary code
Which footnote? I see nothing here:
https://docs.python.org/3/library/functions.html#eval
> On that point, I still don't understand why PyObject_GetItem doesn't have a
> PyDict_CheckExact
New submission from Dan Snider :
The footnote about why eval/exec cannot be used for arbitrary code has been
(for the most part) incorrect for quite some time as the signature for
PyEval_EvalCodeEx demonstrates:
PyObject* PyEval_EvalCodeEx(PyObject *co, PyObject *globals, PyObject *locals,
P