]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-142568: Fix eval() docs to use 'source' parameter name (#142644)
authorJoshua Ward <joshie@flewognetworks.wales>
Sat, 13 Dec 2025 16:07:53 +0000 (11:07 -0500)
committerGitHub <noreply@github.com>
Sat, 13 Dec 2025 16:07:53 +0000 (08:07 -0800)
Doc/library/functions.rst

index 601745a75780fce695dde578cff770f5d2fb9bb3..9cfbb5a482e9747a3173e6c327ea24705a56943e 100644 (file)
@@ -606,16 +606,16 @@ are always available.  They are listed here in alphabetical order.
       This function executes arbitrary code. Calling it with
       user-supplied input may lead to security vulnerabilities.
 
-   The *expression* argument is parsed and evaluated as a Python expression
+   The *source* argument is parsed and evaluated as a Python expression
    (technically speaking, a condition list) using the *globals* and *locals*
    mappings as global and local namespace.  If the *globals* dictionary is
    present and does not contain a value for the key ``__builtins__``, a
    reference to the dictionary of the built-in module :mod:`builtins` is
-   inserted under that key before *expression* is parsed.  That way you can
+   inserted under that key before *source* is parsed.  That way you can
    control what builtins are available to the executed code by inserting your
    own ``__builtins__`` dictionary into *globals* before passing it to
    :func:`eval`.  If the *locals* mapping is omitted it defaults to the
-   *globals* dictionary.  If both mappings are omitted, the expression is
+   *globals* dictionary.  If both mappings are omitted, the source is
    executed with the *globals* and *locals* in the environment where
    :func:`eval` is called.  Note, *eval()* will only have access to the
    :term:`nested scopes <nested scope>` (non-locals) in the enclosing