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

Method resetcache

Lib/idlelib/delegator.py:15–24  ·  view source on GitHub ↗

Removes added attributes while leaving original attributes.

(self)

Source from the content-addressed store, hash-verified

13 return attr
14
15 def resetcache(self):
16 "Removes added attributes while leaving original attributes."
17 # Function is really about resetting delegator dict
18 # to original state. Cache is just a means
19 for key in self.__cache:
20 try:
21 delattr(self, key)
22 except AttributeError:
23 pass
24 self.__cache.clear()
25
26 def setdelegate(self, delegate):
27 "Reset attributes and change delegate."

Callers 6

setdelegateMethod · 0.95
insertfilterafterMethod · 0.80
removefilterMethod · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by 3

tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64