Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
diff --git a/Lib/weakref.py b/Lib/weakref.py
index f780e7a..33b8cbc 100644
--- a/Lib/weakref.py
+++ b/Lib/weakref.py
@@ -144,7 +144,7 @@
return o is not None
def __repr__(self):
- return "<WeakValueDictionary at %#x>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
def __setitem__(self, key, value):
if self._pending_removals:
@@ -348,7 +348,7 @@
return len(self.data) - len(self._pending_removals)
def __repr__(self):
- return "<WeakKeyDictionary at %#x>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
def __setitem__(self, key, value):
self.data[ref(key, self._remove)] = value