summaryrefslogtreecommitdiff
path: root/Lib/weakref.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2014-08-10 10:41:52 -0700
committerRaymond Hettinger <python@rcn.com>2014-08-10 10:41:52 -0700
commitd4cc49f5f367f488379150588d07c7f77dc917e5 (patch)
tree97b4a85c63fe35d488668f2f3d9652231431a572 /Lib/weakref.py
parent9aebd07ac628842838a281dad04c891c410b0396 (diff)
parent7f8878040c398fac32114fb7072cfabf7f7f3fa6 (diff)
downloadcpython-d4cc49f5f367f488379150588d07c7f77dc917e5.tar.gz
merge
Diffstat (limited to 'Lib/weakref.py')
-rw-r--r--Lib/weakref.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/weakref.py b/Lib/weakref.py
index f6a40ca4bf..33b8cbc377 100644
--- a/Lib/weakref.py
+++ b/Lib/weakref.py
@@ -144,7 +144,7 @@ class WeakValueDictionary(collections.MutableMapping):
return o is not None
def __repr__(self):
- return "<WeakValueDictionary at %s>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
def __setitem__(self, key, value):
if self._pending_removals:
@@ -348,7 +348,7 @@ class WeakKeyDictionary(collections.MutableMapping):
return len(self.data) - len(self._pending_removals)
def __repr__(self):
- return "<WeakKeyDictionary at %s>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
def __setitem__(self, key, value):
self.data[ref(key, self._remove)] = value