(self, *, loop=None)
Initialize the future.

        The optional event_loop argument allows explicitly setting the event
        loop object used by the future. If it's not provided, the future uses
        the default event loop.
Initialize the future.
Initialize the future .
def __init__(self, *, loop=None):
        """Initialize the future.

        The optional event_loop argument allows explicitly setting the event
        loop object used by the future. If it's not provided, the future uses
        the default event loop.
        """
        if loop is None:
            self._loop = events._get_event_loop()
        else:
            self._loop = loop
        self._callbacks = []
        if self._loop.get_debug():
            self._source_traceback = format_helpers.extract_stack(
                sys._getframe(1))
def __init__ ( self , * , loop = None ) : if loop is None : self . _loop = events . _get_event_loop ( ) else : self . _loop = loop self . _callbacks = [ ] if self . _loop . get_debug ( ) : self . _source_traceback = format_helpers . extract_stack ( sys . _getframe ( 1 ) )