From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 18 Jul 2026 11:49:34 +0000 (+0200) Subject: [3.13] gh-153808: Replace obsolete 'condition list' verbiage with 'expression list... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=713f1ab2f07c8efb9ec228cf76ba60d75361e9bb;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-153808: Replace obsolete 'condition list' verbiage with 'expression list' in eval() docs (GH-153925) (cherry picked from commit c5e97ed6351766deff488ea6d95e4aa0853943ae) Co-authored-by: palakkhinvasara <109575264+palakkhinvasara@users.noreply.github.com> --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index df22ef6fcf81..e7655449154a 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -594,9 +594,10 @@ are always available. They are listed here in alphabetical order. untrusted user-supplied input will lead to security vulnerabilities. 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 + (technically speaking, an :ref:`expression 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 *source* is parsed. Overriding ``__builtins__`` can be used to restrict or change the available @@ -616,6 +617,9 @@ are always available. They are listed here in alphabetical order. >>> eval('x+1') 2 + >>> eval("1, 2") + (1, 2) + This function can also be used to execute arbitrary code objects (such as those created by :func:`compile`). In this case, pass a code object instead of a string. If the code object has been compiled with ``'exec'`` as the