Cheryl Sabella <chek...@gmail.com> added the comment:

I started taking a look at this and discovered a few things.  There are four 
methods in the C module `_lsprof` that are within the Profiler class - 
`enable`, `disable`, `getstats`, and `clear` and which are all available 
through cProfile.Profile.  These aren't available in profile.py.  Also, 
`getstats` and `clear` aren't in the documentation and `enable` takes two 
optional parameters that aren't mentioned in the documentation.  There are also 
many methods in profile.py that aren't documented.

What would be the preferred approach to fixing the documentation?  It seems 
that the documentation currently focuses on trying to make profile and cProfile 
as similar as possible.  Should they have separate sections that define the 
differences?  Or should `enable` and `disable` be removed since they aren't in 
profile?  The example under 
https://docs.python.org/3.8/library/profile.html#profile.Profile  uses `enable` 
and `disable` and seems to be a helpful example.

----------
nosy: +csabella
stage:  -> needs patch
versions: +Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32017>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to