]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-129368: In PyRun C API docs, clarify what a "start token" is (GH-129935...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 7 Oct 2025 18:30:05 +0000 (20:30 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 18:30:05 +0000 (19:30 +0100)
gh-129368: In PyRun C API docs, clarify what a "start token" is (GH-129935)
(cherry picked from commit e1eca8b308a585af45e9ebf4f605c9f67b7115d8)

Co-authored-by: Rajhans Jadhao <rajhans.jadhao@gmail.com>
Doc/c-api/veryhigh.rst

index fb07fec7effce8adbcc49ae1b94bd1c1e96eaa5d..ee0595a9e089c903e80f58bd4eb8c04b2f8849a3 100644 (file)
@@ -183,7 +183,8 @@ the same library that the Python runtime is using.
    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.
+   the start symbol and must one of the following:
+   :c:data:`Py_eval_input`, :c:data:`Py_file_input`, or :c:data:`Py_single_input`.
 
    Returns the result of executing the code as a Python object, or ``NULL`` if an
    exception was raised.
@@ -231,7 +232,7 @@ the same library that the Python runtime is using.
 .. c:function:: PyObject* Py_CompileStringObject(const char *str, PyObject *filename, int start, PyCompilerFlags *flags, int optimize)
 
    Parse and compile the Python source code in *str*, returning the resulting code
-   object.  The start token is given by *start*; this can be used to constrain the
+   object.  The start symbol is given by *start*; this can be used to constrain the
    code which can be compiled and should be :c:data:`Py_eval_input`,
    :c:data:`Py_file_input`, or :c:data:`Py_single_input`.  The filename specified by
    *filename* is used to construct the code object and may appear in tracebacks or