Skip to content

Commit 4e74259

Browse files
[3.14] pythongh-142568: Fix eval() docs to use 'source' parameter name (pythonGH-142644) (python#142669)
pythongh-142568: Fix eval() docs to use 'source' parameter name (pythonGH-142644) (cherry picked from commit c865ab3) Co-authored-by: Joshua Ward <[email protected]>
1 parent 73c80f6 commit 4e74259

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/functions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,16 +597,16 @@ are always available. They are listed here in alphabetical order.
597597
This function executes arbitrary code. Calling it with
598598
user-supplied input may lead to security vulnerabilities.
599599

600-
The *expression* argument is parsed and evaluated as a Python expression
600+
The *source* argument is parsed and evaluated as a Python expression
601601
(technically speaking, a condition list) using the *globals* and *locals*
602602
mappings as global and local namespace. If the *globals* dictionary is
603603
present and does not contain a value for the key ``__builtins__``, a
604604
reference to the dictionary of the built-in module :mod:`builtins` is
605-
inserted under that key before *expression* is parsed. That way you can
605+
inserted under that key before *source* is parsed. That way you can
606606
control what builtins are available to the executed code by inserting your
607607
own ``__builtins__`` dictionary into *globals* before passing it to
608608
:func:`eval`. If the *locals* mapping is omitted it defaults to the
609-
*globals* dictionary. If both mappings are omitted, the expression is
609+
*globals* dictionary. If both mappings are omitted, the source is
610610
executed with the *globals* and *locals* in the environment where
611611
:func:`eval` is called. Note, *eval()* will only have access to the
612612
:term:`nested scopes <nested scope>` (non-locals) in the enclosing

0 commit comments

Comments
 (0)