The function signature and parameter description correctly use the argument name source:
.. function:: eval(source, /, globals=None, locals=None)
:param source:
A Python expression.
:type source: :class:`str` | :ref:`code object <code-objects>`
However, further down in the same section the text suddenly refers to the argument as “expression”:
The *expression* 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. ...
This creates a mismatch, as there is no parameter named expression in the signature. The text should refer to the argument as source, for consistency.
Suggested fixes (choose one):
- Replace “The expression argument” with “The source argument” to match the function signature.
- Rename the function parameter from source to expression in the signature, so it matches the descriptive text.
Linked PRs
The function signature and parameter description correctly use the argument name
source:However, further down in the same section the text suddenly refers to the argument as “expression”:
This creates a mismatch, as there is no parameter named expression in the signature. The text should refer to the argument as source, for consistency.
Suggested fixes (choose one):
Linked PRs