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

Function _getattribute

tools/python-3.11.9-amd64/Lib/pickle.py:322–333  ·  view source on GitHub ↗
(obj, name)

Source from the content-addressed store, hash-verified

320# Tools used for pickling.
321
322def _getattribute(obj, name):
323 for subpath in name.split('.'):
324 if subpath == '<locals>':
325 raise AttributeError("Can't get local attribute {!r} on {!r}"
326 .format(name, obj))
327 try:
328 parent = obj
329 obj = getattr(obj, subpath)
330 except AttributeError:
331 raise AttributeError("Can't get attribute {!r} on {!r}"
332 .format(name, obj)) from None
333 return obj, parent
334
335def whichmodule(obj, name):
336 """Find the module an object belong to."""

Callers 3

whichmoduleFunction · 0.85
save_globalMethod · 0.85
find_classMethod · 0.85

Calls 2

splitMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected