From b07d65789d7e4e0344bf9c47528617dee3302dfe Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 11 Apr 2023 16:40:41 +0100 Subject: [PATCH] PEP 669: Update to reflect latest additions. (#3100) Update PEP 669 to reflect latest additions. --- pep-0669.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pep-0669.rst b/pep-0669.rst index 66faf0cce..8648da333 100644 --- a/pep-0669.rst +++ b/pep-0669.rst @@ -206,6 +206,7 @@ Events can be controlled globally by modifying the set of events being monitored * ``sys.monitoring.set_events(tool_id:int, event_set: int)`` Activates all events which are set in ``event_set``. + Raises a ``ValueError`` if ``tool_id`` is not in use. No events are active by default. @@ -219,6 +220,7 @@ Events can also be controlled on a per code object basis: * ``sys.monitoring.set_local_events(tool_id:int, code: CodeType, event_set: int)`` Activates all the local events for ``code`` which are set in ``event_set``. + Raises a ``ValueError`` if ``tool_id`` is not in use. Local events add to global events, but do not mask them. In other words, all global events will trigger for a code object, @@ -307,8 +309,8 @@ Order of events If an instructions triggers several events they occur in the following order: -* INSTRUCTION * LINE +* INSTRUCTION * All other events (only one of these events can occur per instruction) Each event is delivered to tools in ascending order of ID.