8000 gh-78612: Mark up eval() using param list by erlend-aasland · Pull Request #115212 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-78612: Mark up eval() using param list #115212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Prev Previous commit
Next Next commit
Simplify
  • Loading branch information
erlend-aasland authored Feb 9, 2024
commit 311640a26e39a2733ca35fb58f9cf7fce73cb3f6
2 changes: 1 addition & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ are always available. They are listed here in alphabetical order.
.. function:: eval(expression, globals=None, locals=None)

:param expression:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently the only function in the page to use :param:. Are you planning to update some/all the others as well?
If not, I think it might be better to keep the original paragraph. Mentioning that it accepts code objects and adding links to that and to "mapping" are good changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters that only one function is marked up better. In any case, there are other good candidates:

  • compile()
  • exec()
  • open()
  • print()
  • __import__()

Possibly also:

  • setattr()
  • sorted()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR, I'd suggest adapting one at the time.

A Python expression as a string or a compiled code object.
A Python expression.
:type expression: :class:`str` | :ref:`code object <code-objects>`

:param globals:
Expand Down
0