From 3ec4665e76ffe55ad83a966c9b04dd3c9fc0f8e3 Mon Sep 17 00:00:00 2001 From: Pavel Karateev Date: Tue, 24 Oct 2023 21:58:17 +0200 Subject: [PATCH 1/2] Fix first parameter name in `tool` functions from `sys.monitoring` --- Doc/library/sys.monitoring.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/sys.monitoring.rst b/Doc/library/sys.monitoring.rst index 1024f66f3264ba..bbf5bd31fb3bd0 100644 --- a/Doc/library/sys.monitoring.rst +++ b/Doc/library/sys.monitoring.rst @@ -44,17 +44,17 @@ Identifiers are integers in the range 0 to 5 inclusive. Registering and using tools ''''''''''''''''''''''''''' -.. function:: use_tool_id(id: int, name: str) -> None +.. 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. -.. function:: free_tool_id(id: int) -> None +.. function:: free_tool_id(tool_id: int) -> None Should be called once a tool no longer requires *id*. -.. function:: get_tool(id: int) -> str | None +.. function:: get_tool(tool_id: int) -> str | None Returns the name of the tool if *id* is in use, otherwise it returns ``None``. From 72e5c8ca8296d8a1e8faf98dc30ce39d673b1931 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 24 Oct 2023 22:08:56 +0100 Subject: [PATCH 2/2] change other mentions of *id* --- Doc/library/sys.monitoring.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/library/sys.monitoring.rst b/Doc/library/sys.monitoring.rst index bbf5bd31fb3bd0..c2168cd9f06b08 100644 --- a/Doc/library/sys.monitoring.rst +++ b/Doc/library/sys.monitoring.rst @@ -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::