diff options
Diffstat (limited to 'Lib/weakref.py')
-rw-r--r-- | Lib/weakref.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/weakref.py b/Lib/weakref.py index 70d36fa..a1fa4e8 100644 --- a/Lib/weakref.py +++ b/Lib/weakref.py @@ -144,12 +144,12 @@ class WeakKeyDictionary(UserDict.UserDict): def __init__(self, dict=None): self.data = {} - if dict is not None: self.update(dict) def remove(k, selfref=ref(self)): self = selfref() if self is not None: del self.data[k] self._remove = remove + if dict is not None: self.update(dict) def __delitem__(self, key): for ref in self.data.iterkeys(): |