MCPcopy Index your code
hub / github.com/python/cpython / resolve

Function resolve

Lib/pydoc.py:1698–1710  ·  view source on GitHub ↗

Given an object or a path to an object, get the object and its name.

(thing, forceload=0)

Source from the content-addressed store, hash-verified

1696html = HTMLDoc()
1697
1698def resolve(thing, forceload=0):
1699 """Given an object or a path to an object, get the object and its name."""
1700 if isinstance(thing, str):
1701 object = locate(thing, forceload)
1702 if object is None:
1703 raise ImportError('''\
1704No Python documentation found for %r.
1705Use help() to get the interactive help utility.
1706Use help(str) for help on the str class.''' % thing)
1707 return object, thing
1708 else:
1709 name = getattr(thing, '__name__', None)
1710 return thing, name if isinstance(name, str) else None
1711
1712def render_doc(thing, title='Python Library Documentation: %s', forceload=0,
1713 renderer=None):

Callers 4

render_docFunction · 0.70
writedocFunction · 0.70
onReadableFunction · 0.50

Calls 1

locateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…