MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / resolve

Function resolve

tools/python-3.11.9-amd64/Lib/pydoc.py:1822–1834  ·  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

1820html = HTMLDoc()
1821
1822def resolve(thing, forceload=0):
1823 """Given an object or a path to an object, get the object and its name."""
1824 if isinstance(thing, str):
1825 object = locate(thing, forceload)
1826 if object is None:
1827 raise ImportError('''\
1828No Python documentation found for %r.
1829Use help() to get the interactive help utility.
1830Use help(str) for help on the str class.''' % thing)
1831 return object, thing
1832 else:
1833 name = getattr(thing, '__name__', None)
1834 return thing, name if isinstance(name, str) else None
1835
1836def render_doc(thing, title='Python Library Documentation: %s', forceload=0,
1837 renderer=None):

Callers 2

render_docFunction · 0.70
writedocFunction · 0.70

Calls 1

locateFunction · 0.70

Tested by

no test coverage detected