summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-06-04 09:20:03 +0000
committerGeorg Brandl <georg@python.org>2005-06-04 09:20:03 +0000
commit9166e1a24ac7b15776ffd38e436fa51a9b002674 (patch)
treec322e52c12aaaf6ddf85c16e427d69d5b15b7236
parent4c560ea05bb2872cdca2d4abdacd8926fb00b848 (diff)
downloadcpython-git-9166e1a24ac7b15776ffd38e436fa51a9b002674.tar.gz
Bug #1196315: fix weakref.WeakValueDictionary constructor.
-rw-r--r--Lib/weakref.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/weakref.py b/Lib/weakref.py
index c0669b0317..09bd0bee24 100644
--- a/Lib/weakref.py
+++ b/Lib/weakref.py
@@ -43,12 +43,12 @@ class WeakValueDictionary(UserDict.UserDict):
# 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]()
diff --git a/Misc/NEWS b/Misc/NEWS
index 637ca2eb13..f15e87390b 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -141,6 +141,8 @@ Extension Modules
Library
-------
+- Bug #1196315: fix weakref.WeakValueDictionary constructor.
+
- Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
component of the path.