(self, coro, *, name=None)
return task
Schedule a coroutine object.

        Return a task object.
Schedule a coroutine object.
Schedule a coroutine object .
def create_task(self, coro, *, name=None):
        """Schedule a coroutine object.

        Return a task object.
        """
        self._check_closed()
        if self._task_factory is None:
            task = tasks.Task(coro, loop=self, name=name)
            if task._source_traceback:
                del task._source_traceback[-1]
        else:
            task = self._task_factory(self, coro)
            tasks._set_task_name(task, name)

        return task
def create_task ( self , coro , * , name = None ) : self . _check_closed ( ) if self . _task_factory is None : task = tasks . Task ( coro , loop = self , name = name ) if task . _source_traceback : del task . _source_traceback [ - 1 ] else : task = self . _task_factory ( self , coro ) tasks . _set_task_name ( task , name ) return task