Lines Matching full:future
8 # States for Future.
15 """Check for a Future.
17 This returns True when obj is a Future instance or is advertising
19 See comment in Future for more details.
26 """helper function for Future.__repr__"""
45 def _future_repr_info(future): argument
46 # (Future) -> str
47 """helper function for Future.__repr__"""
48 info = [future._state.lower()]
49 if future._state == _FINISHED:
50 if future._exception is not None:
51 info.append(f'exception={future._exception!r}')
55 result = reprlib.repr(future._result)
57 if future._callbacks:
58 info.append(_format_callbacks(future._callbacks))
59 if future._source_traceback:
60 frame = future._source_traceback[-1]
66 def _future_repr(future): argument
67 info = ' '.join(_future_repr_info(future))
68 return f'<{future.__class__.__name__} {info}>'