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

Method __getattr__

Lib/idlelib/delegator.py:9–13  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

7 # when changing the delegate.
8
9 def __getattr__(self, name):
10 attr = getattr(self.delegate, name) # May raise AttributeError
11 setattr(self, name, attr)
12 self.__cache.add(name)
13 return attr
14
15 def resetcache(self):
16 "Removes added attributes while leaving original attributes."

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected