summaryrefslogtreecommitdiff
path: root/Lib/idlelib/Delegator.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/Delegator.py')
-rw-r--r--Lib/idlelib/Delegator.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/Lib/idlelib/Delegator.py b/Lib/idlelib/Delegator.py
index 93253b9fbc..c4765163f8 100644
--- a/Lib/idlelib/Delegator.py
+++ b/Lib/idlelib/Delegator.py
@@ -4,12 +4,12 @@ class Delegator:
def __init__(self, delegate=None):
self.delegate = delegate
- self.__cache = {}
+ self.__cache = set()
def __getattr__(self, name):
attr = getattr(self.delegate, name) # May raise AttributeError
setattr(self, name, attr)
- self.__cache[name] = attr
+ self.__cache.add(name)
return attr
def resetcache(self):
@@ -20,14 +20,6 @@ class Delegator:
pass
self.__cache.clear()
- def cachereport(self):
- keys = list(self.__cache.keys())
- keys.sort()
- print(keys)
-
def setdelegate(self, delegate):
self.resetcache()
self.delegate = delegate
-
- def getdelegate(self):
- return self.delegate