def _future_repr_info(future):
 info = [future._state.lower()]
 if (future._state == _FINISHED):
  if (future._exception is not None):
   info.append('exception={!r}'.format(future._exception))
  else:
   result = reprlib.repr(future._result)
   info.append('result={}'.format(result))
 if future._callbacks:
  info.append(_format_callbacks(future._callbacks))
 if future._source_traceback:
  frame = future._source_traceback[(-1)]
  info.append(('created at %s:%s' % (frame[0], frame[1])))
 return info

def _future_repr_info ( future ) : info = [ future . _state . lower ( ) ] if ( future . _state == _FINISHED ) : if ( future . _exception is not None ) : info . append ( 'exception={!r}' . format ( future . _exception ) ) else : result = reprlib . repr ( future . _result ) info . append ( 'result={}' . format ( result ) ) if future . _callbacks : info . append ( _format_callbacks ( future . _callbacks ) ) if future . _source_traceback : frame = future . _source_traceback [ ( - 1 ) ] info . append ( ( 'created at %s:%s' % ( frame [ 0 ] , frame [ 1 ] ) ) ) return info
helper function for future .