mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
GH-65961: Stop setting __cached__ on modules
This commit is contained in:
parent
e32c975640
commit
28f1334f1a
32 changed files with 93 additions and 240 deletions
12
Lib/pydoc.py
12
Lib/pydoc.py
|
|
@ -241,12 +241,12 @@ def visiblename(name, all=None, obj=None):
|
|||
"""Decide whether to show documentation on a variable."""
|
||||
# Certain special names are redundant or internal.
|
||||
# XXX Remove __initializing__?
|
||||
if name in {'__author__', '__builtins__', '__cached__', '__credits__',
|
||||
'__date__', '__doc__', '__file__', '__spec__',
|
||||
'__loader__', '__module__', '__name__', '__package__',
|
||||
'__path__', '__qualname__', '__slots__', '__version__',
|
||||
'__static_attributes__', '__firstlineno__',
|
||||
'__annotate_func__', '__annotations_cache__'}:
|
||||
if name in {'__author__', '__builtins__', '__credits__', '__date__',
|
||||
'__doc__', '__file__', '__spec__', '__loader__', '__module__',
|
||||
'__name__', '__package__', '__path__', '__qualname__',
|
||||
'__slots__', '__version__', '__static_attributes__',
|
||||
'__firstlineno__', '__annotate_func__',
|
||||
'__annotations_cache__'}:
|
||||
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