[issue36283] eval is needlessly limited

2019-03-13 Thread Steven D'Aprano
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 >

[issue36283] eval is needlessly limited

2019-03-13 Thread Dan Snider
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,