Closed
Description
Currently the sys.monitoring
doc (https://docs.python.org/3/library/sys.monitoring.html) contains NO concrete example of how sys.monitoring
APIs should be invoked in a workflow. Nor did I find any straightforward examples of sys.monitoring
after some simple Googling.
Should we consider adding an runnable example like function coverage with sys.monitoring
APIs?
Metadata
Metadata
Assignees
Projects
Status
Todo
Activity
AA-Turner commentedon Oct 21, 2024
E.g. https://mostlynerdless.de/blog/2023/11/10/lets-create-a-python-debugger-together-part-4-python-3-12-edition/?
A
xuantengh commentedon Oct 21, 2024
IMHO this is still somehow complicated. I think the code snippet in #111963 may be a good example?
gaogaotiantian commentedon Oct 21, 2024
I'm a bit on the fence. On one hand, it would be nice to have some example. However, this is an API that is almost exclusively for dev tool developers and I don't know how much examples would benefit, compared to the extra space it would take to make the docs less readable. As a comparison,
sys.settrace
andsys.setprofile
does not have any examples in the docs (that I can find).The reason why there aren't many examples on the internet is because the feature is only out about a year. Even stdlib has not fully adopted it yet.