8000 Fix first parameter name in `tool` functions from `sys.monitoring` by lancelote · Pull Request #111286 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Fix first parameter name in tool functions from sys.monitoring #111286

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 2 commits into from
Oct 24, 2023
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
Diff view
Prev Previous commit
change other mentions of *id*
  • Loading branch information
AlexWaygood authored Oct 24, 2023
commit 72e5c8ca8296d8a1e8faf98dc30ce39d673b1931
12 changes: 6 additions & 6 deletions Doc/library/sys.monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ Registering and using tools

.. function:: use_tool_id(tool_id: int, name: str) -> None

Must be called before *id* can be used.
*id* must be in the range 0 to 5 inclusive.
Raises a :exc:`ValueError` if *id* is in use.
Must be called before *tool_id* can be used.
*tool_id* must be in the range 0 to 5 inclusive.
Raises a :exc:`ValueError` if *tool_id* is in use.

.. function:: free_tool_id(tool_id: int) -> None

Should be called once a tool no longer requires *id*.
Should be called once a tool no longer requires *tool_id*.

.. function:: get_tool(tool_id: int) -> str | None

Returns the name of the tool if *id* is in use,
Returns the name of the tool if *tool_id* is in use,
otherwise it returns ``None``.
*id* must be in the range 0 to 5 inclusive.
*tool_id* must be in the range 0 to 5 inclusive.

All IDs are treated the same by the VM with regard to events, but the
following IDs are pre-defined to make co-operation of tools easier::
Expand Down
0