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

Method __getattr__

Lib/unittest/mock.py:331–335  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

329 self._sentinels = {}
330
331 def __getattr__(self, name):
332 if name == '__bases__':
333 # Without this help(unittest.mock) raises an exception
334 raise AttributeError
335 return self._sentinels.setdefault(name, _SentinelObject(name))
336
337 def __reduce__(self):
338 return 'sentinel'

Callers

nothing calls this directly

Calls 2

_SentinelObjectClass · 0.85
setdefaultMethod · 0.45

Tested by

no test coverage detected