summaryrefslogtreecommitdiffstats
path: root/Lib/weakref.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-07-22 09:14:52 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-07-22 09:14:52 (GMT)
commit0c937b3ed6d2eeca84fa4aca1a9aef685db65abc (patch)
treef5691e459361ce03018098bbad26f9472e8340e5 /Lib/weakref.py
parentfbc877b7940beaa23fea020b8a137a660eff419e (diff)
downloadcpython-0c937b3ed6d2eeca84fa4aca1a9aef685db65abc.zip
cpython-0c937b3ed6d2eeca84fa4aca1a9aef685db65abc.tar.gz
cpython-0c937b3ed6d2eeca84fa4aca1a9aef685db65abc.tar.bz2
Issue #22031: Reprs now always use hexadecimal format with the "0x" prefix
when contain an id in form " at 0x...".
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 f6a40ca..f780e7a 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 "<WeakValueDictionary at %#x>" % 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 "<WeakKeyDictionary at %#x>" % id(self)
def __setitem__(self, key, value):
self.data[ref(key, self._remove)] = value