mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-113942: Show functions implemented as builtin methods (GH-115306)
Pydoc no longer skips global functions implemented as builtin methods, such as MethodDescriptorType and WrapperDescriptorType.
This commit is contained in:
parent
68c79d21fa
commit
72cff8d8e5
4 changed files with 24 additions and 6 deletions
12
Lib/pydoc.py
12
Lib/pydoc.py
|
@ -855,9 +855,9 @@ class HTMLDoc(Doc):
|
|||
cdict[key] = cdict[base] = modname + '.html#' + key
|
||||
funcs, fdict = [], {}
|
||||
for key, value in inspect.getmembers(object, inspect.isroutine):
|
||||
# if __all__ exists, believe it. Otherwise use old heuristic.
|
||||
if (all is not None or
|
||||
inspect.isbuiltin(value) or inspect.getmodule(value) is object):
|
||||
# if __all__ exists, believe it. Otherwise use a heuristic.
|
||||
if (all is not None
|
||||
or (inspect.getmodule(value) or object) is object):
|
||||
if visiblename(key, all, object):
|
||||
funcs.append((key, value))
|
||||
fdict[key] = '#-' + key
|
||||
|
@ -1299,9 +1299,9 @@ location listed above.
|
|||
classes.append((key, value))
|
||||
funcs = []
|
||||
for key, value in inspect.getmembers(object, inspect.isroutine):
|
||||
# if __all__ exists, believe it. Otherwise use old heuristic.
|
||||
if (all is not None or
|
||||
inspect.isbuiltin(value) or inspect.getmodule(value) is object):
|
||||
# if __all__ exists, believe it. Otherwise use a heuristic.
|
||||
if (all is not None
|
||||
or (inspect.getmodule(value) or object) is object):
|
||||
if visiblename(key, all, object):
|
||||
funcs.append((key, value))
|
||||
data = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue