This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Option in pydoc to show docs from private methods
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.2
Status: languishing Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, mortenlj
Priority: low Keywords: patch

Created on 2008-06-25 09:32 by mortenlj, last changed 2022-04-11 14:56 by admin.

File name Uploaded Description Edit
pydoc.privatenames.patch mortenlj, 2008-06-25 09:32 Adding option to include private names to pydoc
Messages (3)
msg68722 - (view) Author: Morten Lied Johansen (mortenlj) Date: 2008-06-25 09:32
Currently, running pydoc on a module will show you the documentation on 
all regular methods, and all special methods (starting and ending in 
double underscores).

Private methods (starting with a single underscore) are not included.

Some times, it would be nice to include docs for these methods aswell, 
and a small change to pydoc.visiblename solves the problem.

I've included a patch that adds this behaviour as an option (-i for 
include private names). The implementation isn't as clean as one would 
hope for (sets a global flag), but was the best I could come up with in 
the short time I had available. Feel free to make a better 

The patch is against python 2.5.
msg110146 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-12 22:46
This option would be more useful if it became an optional argument to the help() function.  For someone working at the python command line prompt, having to switch to pydoc to see private method documentation may be inconvenient.  It is more natural to write

>>> help(foo, show_private=True)
msg111204 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-22 18:16
It looks like OP has lost interest and I don't have time to move it forward.
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47446
2010-10-25 02:36:21r.david.murraysetstatus: open -> languishing
2010-07-22 18:16:07belopolskysetpriority: normal -> low
assignee: belopolsky ->
messages: + msg111204

stage: needs patch -> patch review
2010-07-12 22:46:53belopolskysetstage: needs patch
messages: + msg110146
versions: + Python 3.2, - Python 2.7
2010-05-28 05:32:53belopolskysetassignee: belopolsky

nosy: + belopolsky
2008-06-25 12:16:37benjamin.petersonsetversions: + Python 2.7, - Python 2.5
2008-06-25 09:32:34mortenljcreate