PEP 669: Clarify section on DISABLE. (#2759)

Clarify section on DISABLE.
This commit is contained in:
Mark Shannon 2022-08-11 17:33:48 +01:00 committed by GitHub
parent 738a01cb30
commit 9819ca468e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -217,10 +217,11 @@ recieve any more events for that ``(code, instruction_offset)``.
This feature is provided for coverage and other tools that are only interested
seeing an event once.
Tools may see events after returning ``DISABLE``, in which case, they will not see
those events until ``sys.monitoring.restart_events()`` is called.
If a callback function returns ``DISABLE``, then that function will no longer
be called for that event and location until
``sys.monitoring.restart_events()`` is called.
Note that ``sys.monitoring.restart_events()`` is not specific to one tool,
so tools must be prepared to recieve events that they have chosen to DISABLE.
so tools must be prepared to receive events that they have chosen to DISABLE.
Events in callback functions
----------------------------