|
|
@ -1905,9 +1905,9 @@ delattr(<object>, <span class="hljs-string">'<attr_name>'</span>) |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
|
|
|
|
<pre><code class="python language-python hljs"><coro> = <async_func>(<args>) <span class="hljs-comment"># Creates a coroutine.</span> |
|
|
|
<pre><code class="python language-python hljs"><coro> = <async_function>(<args>) <span class="hljs-comment"># Creates a coroutine by calling async def function.</span> |
|
|
|
<obj> = <span class="hljs-keyword">await</span> <coroutine> <span class="hljs-comment"># Starts the coroutine and returns result.</span> |
|
|
|
<task> = aio.create_task(<coroutine>) <span class="hljs-comment"># Schedules coroutine for execution.</span> |
|
|
|
<task> = aio.create_task(<coroutine>) <span class="hljs-comment"># Schedules the coroutine for execution.</span> |
|
|
|
<obj> = <span class="hljs-keyword">await</span> <task> <span class="hljs-comment"># Returns result. Also <task>.cancel().</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs"><coro> = aio.gather(<coro/task>, ...) <span class="hljs-comment"># Schedules coroutines. Returns results when awaited.</span> |
|
|
|