Open xuantengh opened 1 week ago
IMHO this is still somehow complicated. I think the code snippet in #111963 may be a good example?
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
and sys.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.
Currently the
sys.monitoring
doc (https://docs.python.org/3/library/sys.monitoring.html) contains NO concrete example of howsys.monitoring
APIs should be invoked in a workflow. Nor did I find any straightforward examples ofsys.monitoring
after some simple Googling.Should we consider adding an runnable example like function coverage with
sys.monitoring
APIs?