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.

classification
Title: pydoc may hide non-private doc strings.
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: jlivingston, ncoghlan, tlesher
Priority: normal Keywords: easy

Created on 2005-04-25 21:00 by jlivingston, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg60734 - (view) Author: J Livingston (jlivingston) Date: 2005-04-25 21:00
I am using Python version 2.3.4, pydoc version 1.86.8.1 
on WinXP SP2.

pydoc's visiblename() method indicates "Private names 
are hidden, but special names are displayed". However, 
visiblename's private name qualifier seems to be 
(name.startswith('_')) while Python's private name 
qualifier is something more along the lines of 
((name.startswith('__') and ((name[-1] != '_') or ((name[-1] 
== '_') and (name[-2] != '_')))).

Having said that, it would be useful if a command line 
switch enabled documentation for private names. This 
would be helpful in a development environment...
msg60735 - (view) Author: J Livingston (jlivingston) Date: 2005-04-29 13:38
Logged In: YES 
user_id=1160595

An amendment is need for this enhancement request...

The focus at the time of submitting the request was that of 
classes and their private data. It seems the comment in the 
code and the code itself may have been written with the focus 
of modules and the rule that prohibits importing names that 
begin with '_' when an 'import *' is used for a module.

This may open another can of worms altogether. To 
distinguish the 'private' names of modules and classes 
visiblenames() would have to employ different logic for each. 
Also, one would wonder if the elements of an __all__ list 
would have to be considered the non-private names of a 
module or package... From this point, a discussion of what is 
considered ‘private’ could become quite lengthy and also 
subjective.

Although discussion regarding this level of complexity may be 
relevant at some point, the intent of the enhancement request 
was primarily to allow 'private' doc strings to be visible if 
explicitly requested.

msg137102 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2011-05-28 01:00
In the time since 2.3, pydoc.visiblename() has been updated to use the correct definition of visibility.

A "developer" mode that exposes internal details doesn't make sense. When you're developing something and want to see internal details, *look at the code*.
History
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 41897
2011-05-28 01:00:11ncoghlansetstatus: open -> closed

nosy: + ncoghlan
messages: + msg137102

resolution: rejected
stage: test needed -> resolved
2011-03-15 19:35:15tleshersetnosy: + tlesher
2010-08-21 13:57:53BreamoreBoysetversions: + Python 3.2, - Python 2.7
2009-04-22 14:43:57ajaksu2setkeywords: + easy
2009-02-16 01:01:29ajaksu2setstage: test needed
type: enhancement
versions: + Python 2.7
2005-04-25 21:00:42jlivingstoncreate