diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 23:36:00 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 23:36:00 +0300 |
commit | bcd8dccf51c716a73884baa8eb3ad84065685a8b (patch) | |
tree | 0efe0e4670465a6f2e2ee3099a73dd97b21d1f33 /Lib/concurrent | |
parent | 59b7ff6ad555c21e72acbed0f86849f6907e8d40 (diff) | |
download | cpython-bcd8dccf51c716a73884baa8eb3ad84065685a8b.tar.gz |
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.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py index acd05d0b2a..c13b3b6b29 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): |