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.