diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2013-06-30 18:37:05 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2013-06-30 18:37:05 -0400 |
commit | 97deca4c4b86407a1d6fcd159af45dd89c532673 (patch) | |
tree | d9a0926ed66fdd84ea1d4bbc359d63e3eca288f0 /Lib/idlelib/Delegator.py | |
parent | 70c211936ff5286fd674cede17de73ff4fffd604 (diff) | |
download | cpython-97deca4c4b86407a1d6fcd159af45dd89c532673.tar.gz |
Issue #18189: add test_delegator for Idle Delegator class.
Also change private dict used as a set to a set.
Diffstat (limited to 'Lib/idlelib/Delegator.py')
-rw-r--r-- | Lib/idlelib/Delegator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/Delegator.py b/Lib/idlelib/Delegator.py index 362c7cdfe2..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): |