mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
PEP 3147
This commit is contained in:
parent
0e59cc3fc3
commit
28a691b7fd
39 changed files with 1203 additions and 287 deletions
|
@ -159,7 +159,8 @@ def visiblename(name, all=None):
|
|||
"""Decide whether to show documentation on a variable."""
|
||||
# Certain special names are redundant.
|
||||
_hidden_names = ('__builtins__', '__doc__', '__file__', '__path__',
|
||||
'__module__', '__name__', '__slots__', '__package__')
|
||||
'__module__', '__name__', '__slots__', '__package__',
|
||||
'__cached__')
|
||||
if name in _hidden_names: return 0
|
||||
# Private names are hidden, but special names are displayed.
|
||||
if name.startswith('__') and name.endswith('__'): return 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue