summaryrefslogtreecommitdiffstats
path: root/Lib/concurrent
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-07-25 20:36:00 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-07-25 20:36:00 (GMT)
commit465e60e654732b3a0b726d1fd82950fc982fcba2 (patch)
tree25a1567d99855ff0a2ffcdc1f7c7659f85aaaa0b /Lib/concurrent
parent54701f303fdde38c53811776ba2d16fabf219dcc (diff)
downloadcpython-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/concurrent')
-rw-r--r--Lib/concurrent/futures/_base.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py
index acd05d0..c13b3b6 100644
--- a/Lib/concurrent/futures/_base.py
+++ b/Lib/concurrent/futures/_base.py
@@ -302,17 +302,20 @@ class Future(object):
with self._condition:
if self._state == FINISHED:
if self._exception:
- return '<Future at %s state=%s raised %s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s raised %s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state],
self._exception.__class__.__name__)
else:
- return '<Future at %s state=%s returned %s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s returned %s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state],
self._result.__class__.__name__)
- return '<Future at %s state=%s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state])
def cancel(self):