diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 20:36:00 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 20:36:00 (GMT) |
commit | 465e60e654732b3a0b726d1fd82950fc982fcba2 (patch) | |
tree | 25a1567d99855ff0a2ffcdc1f7c7659f85aaaa0b /Lib/weakref.py | |
parent | 54701f303fdde38c53811776ba2d16fabf219dcc (diff) | |
download | cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.zip cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.gz cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.bz2 |
Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
Diffstat (limited to 'Lib/weakref.py')
-rw-r--r-- | Lib/weakref.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ class WeakValueDictionary(collections.MutableMapping): 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 @@ class WeakKeyDictionary(collections.MutableMapping): 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 |