summaryrefslogtreecommitdiff
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorguido <guido@google.com>2011-03-29 12:02:49 -0700
committerguido <guido@google.com>2011-03-29 12:02:49 -0700
commitcea1c1161964fc314a0e3dd68e74ceb563fc528c (patch)
tree89c6f150cb5aec505ea2e0e3df746f50b3e85050 /Lib/pydoc.py
parent7e603d1d2989bfb010d3641a3e152df13e0afbb0 (diff)
parentdff28659880a2ce62ef2c87dc7de58aaa86b85fc (diff)
downloadcpython-cea1c1161964fc314a0e3dd68e74ceb563fc528c.tar.gz
Merge Issue 11662 from 3.2 branch.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 9d3cdd5c9b..9f8f120c94 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -168,11 +168,11 @@ def _split_list(s, predicate):
def visiblename(name, all=None):
"""Decide whether to show documentation on a variable."""
# Certain special names are redundant.
- _hidden_names = ('__builtins__', '__doc__', '__file__', '__path__',
+ if name in {'__builtins__', '__doc__', '__file__', '__path__',
'__module__', '__name__', '__slots__', '__package__',
'__cached__', '__author__', '__credits__', '__date__',
- '__version__')
- if name in _hidden_names: return 0
+ '__version__'}:
+ return 0
# Private names are hidden, but special names are displayed.
if name.startswith('__') and name.endswith('__'): return 1
if all is not None: