blob: ca408ff071b68e555a5c08236405ab8c09e8fc17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-an,v 1.5 2005/08/23 20:55:46 darcy Exp $
--- Lib/weakref.py.orig 2004-08-31 07:38:12.000000000 -0400
+++ Lib/weakref.py
@@ -43,12 +43,12 @@ class WeakValueDictionary(UserDict.UserD
# way in).
def __init__(self, *args, **kw):
- UserDict.UserDict.__init__(self, *args, **kw)
def remove(wr, selfref=ref(self)):
self = selfref()
if self is not None:
del self.data[wr.key]
self._remove = remove
+ UserDict.UserDict.__init__(self, *args, **kw)
def __getitem__(self, key):
o = self.data[key]()
|