From: Fred Drake Date: Tue, 10 Apr 2001 19:09:35 +0000 (+0000) Subject: Use the WeakKeyDictionary and WeakValueDictionary classes directly X-Git-Tag: v2.1c1~118 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf43691ccb5198ab0f853ed2297afa98f9ad878c;p=thirdparty%2FPython%2Fcpython.git Use the WeakKeyDictionary and WeakValueDictionary classes directly instead of using the mapping() function. --- diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index 1e193f1920be..d818b3365bb2 100644 --- a/Lib/test/test_weakref.py +++ b/Lib/test/test_weakref.py @@ -210,7 +210,7 @@ class MappingTestCase(TestBase): COUNT = 10 def test_weak_values(self): - dict = weakref.mapping() + dict = weakref.WeakValueDictionary() objects = map(Object, range(self.COUNT)) for o in objects: dict[o.arg] = o @@ -236,7 +236,7 @@ class MappingTestCase(TestBase): "deleting the values did not clear the dictionary") def test_weak_keys(self): - dict = weakref.mapping(weakkeys=1) + dict = weakref.WeakKeyDictionary() objects = map(Object, range(self.COUNT)) for o in objects: dict[o] = o.arg