mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
gh-105879: Add support for keyword arguments to eval and exec (#105885)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
72867c962c
commit
2770d5caca
5 changed files with 98 additions and 33 deletions
|
@ -925,9 +925,9 @@ builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y)
|
|||
eval as builtin_eval
|
||||
|
||||
source: object
|
||||
/
|
||||
globals: object = None
|
||||
locals: object = None
|
||||
/
|
||||
|
||||
Evaluate the given source in the context of globals and locals.
|
||||
|
||||
|
@ -941,7 +941,7 @@ If only globals is given, locals defaults to it.
|
|||
static PyObject *
|
||||
builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
|
||||
PyObject *locals)
|
||||
/*[clinic end generated code: output=0a0824aa70093116 input=11ee718a8640e527]*/
|
||||
/*[clinic end generated code: output=0a0824aa70093116 input=7c7bce5299a89062]*/
|
||||
{
|
||||
PyObject *result = NULL, *source_copy;
|
||||
const char *str;
|
||||
|
@ -1024,9 +1024,9 @@ builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
|
|||
exec as builtin_exec
|
||||
|
||||
source: object
|
||||
/
|
||||
globals: object = None
|
||||
locals: object = None
|
||||
/
|
||||
*
|
||||
closure: object(c_default="NULL") = None
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ when source is a code object requiring exactly that many cellvars.
|
|||
static PyObject *
|
||||
builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
|
||||
PyObject *locals, PyObject *closure)
|
||||
/*[clinic end generated code: output=7579eb4e7646743d input=f13a7e2b503d1d9a]*/
|
||||
/*[clinic end generated code: output=7579eb4e7646743d input=25e989b6d87a3a21]*/
|
||||
{
|
||||
PyObject *v;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue