summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-08-13 02:38:18 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-08-13 02:38:18 (GMT)
commit0b9e64122b044c71dd1006ea1c257191ead17d4d (patch)
treef2a940ccffde576fdc0bcd28f7efc08da7d5b66b /Doc/c-api
parent10c2dd216a89f74bc607dea5a8a6b084d841578d (diff)
parentbd664357f12bb3b597607be96552c115cf8e9fc0 (diff)
downloadcpython-0b9e64122b044c71dd1006ea1c257191ead17d4d.zip
cpython-0b9e64122b044c71dd1006ea1c257191ead17d4d.tar.gz
cpython-0b9e64122b044c71dd1006ea1c257191ead17d4d.tar.bz2
Issue #24637: Merge from 3.5
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/veryhigh.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst
index 706efdf..e9c9377 100644
--- a/Doc/c-api/veryhigh.rst
+++ b/Doc/c-api/veryhigh.rst
@@ -219,9 +219,10 @@ the same library that the Python runtime is using.
.. c:function:: PyObject* PyRun_StringFlags(const char *str, int start, PyObject *globals, PyObject *locals, PyCompilerFlags *flags)
Execute Python source code from *str* in the context specified by the
- dictionaries *globals* and *locals* with the compiler flags specified by
- *flags*. The parameter *start* specifies the start token that should be used to
- parse the source code.
+ objects *globals* and *locals* with the compiler flags specified by
+ *flags*. *globals* must be a dictionary; *locals* can be any object
+ that implements the mapping protocol. The parameter *start* specifies
+ the start token that should be used to parse the source code.
Returns the result of executing the code as a Python object, or *NULL* if an
exception was raised.
@@ -295,16 +296,16 @@ the same library that the Python runtime is using.
.. c:function:: PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals)
This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just
- the code object, and the dictionaries of global and local variables.
- The other arguments are set to *NULL*.
+ the code object, and global and local variables. The other arguments are
+ set to *NULL*.
.. c:function:: PyObject* PyEval_EvalCodeEx(PyObject *co, PyObject *globals, PyObject *locals, PyObject **args, int argcount, PyObject **kws, int kwcount, PyObject **defs, int defcount, PyObject *closure)
Evaluate a precompiled code object, given a particular environment for its
- evaluation. This environment consists of dictionaries of global and local
- variables, arrays of arguments, keywords and defaults, and a closure tuple of
- cells.
+ evaluation. This environment consists of a dictionary of global variables,
+ a mapping object of local variables, arrays of arguments, keywords and
+ defaults, and a closure tuple of cells.
.. c:type:: PyFrameObject