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

Function _resolve

Lib/logging/config.py:94–106  ·  view source on GitHub ↗

Resolve a dotted name to a global object.

(name)

Source from the content-addressed store, hash-verified

92
93
94def _resolve(name):
95 """Resolve a dotted name to a global object."""
96 name = name.split('.')
97 used = name.pop(0)
98 found = __import__(used)
99 for n in name:
100 used = used + '.' + n
101 try:
102 found = getattr(found, n)
103 except AttributeError:
104 __import__(used)
105 found = getattr(found, n)
106 return found
107
108def _strip_spaces(alist):
109 return map(str.strip, alist)

Callers 3

_create_formattersFunction · 0.85
_install_handlersFunction · 0.85
configure_formatterMethod · 0.85

Calls 3

__import__Function · 0.85
splitMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…