(cb)
return f'cb=[{cb}]'
helper function for Future.__repr__
helper function for Future.__repr__
helper function for Future . __repr__
def _format_callbacks(cb):
    """helper function for Future.__repr__"""
    size = len(cb)
    if not size:
        cb = ''

    def format_cb(callback):
        return format_helpers._format_callback_source(callback, ())

    if size == 1:
        cb = format_cb(cb[0][0])
    elif size == 2:
        cb = '{}, {}'.format(format_cb(cb[0][0]), format_cb(cb[1][0]))
    elif size > 2:
        cb = '{}, <{} more>, {}'.format(format_cb(cb[0][0]),
                                        size - 2,
                                        format_cb(cb[-1][0]))
    return f'cb=[{cb}]'
def _format_callbacks ( cb ) : size = len ( cb ) if not size : cb = '' def format_cb ( callback ) : return format_helpers . _format_callback_source ( callback , ( ) ) if size == 1 : cb = format_cb ( cb [ 0 ] [ 0 ] ) elif size == 2 : cb = '{}, {}' . format ( format_cb ( cb [ 0 ] [ 0 ] ) , format_cb ( cb [ 1 ] [ 0 ] ) ) elif size > 2 : cb = '{}, <{} more>, {}' . format ( format_cb ( cb [ 0 ] [ 0 ] ) , size - 2 , format_cb ( cb [ - 1 ] [ 0 ] ) ) return f'cb=[{cb}]'