File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ Coroutines
2020
2121:term: `Coroutines <coroutine> ` declared with the async/await syntax is the
2222preferred way of writing asyncio applications. For example, the following
23- snippet of code (requires Python 3.7+) prints "hello", waits 1 second,
23+ snippet of code prints "hello", waits 1 second,
2424and then prints "world"::
2525
2626 >>> import asyncio
@@ -223,21 +223,6 @@ Creating Tasks
223223 :exc: `RuntimeError ` is raised if there is no running loop in
224224 current thread.
225225
226- This function has been **added in Python 3.7 **. Prior to
227- Python 3.7, the low-level :func: `asyncio.ensure_future ` function
228- can be used instead::
229-
230- async def coro():
231- ...
232-
233- # In Python 3.7+
234- task = asyncio.create_task(coro())
235- ...
236-
237- # This works in all Python versions but is less readable
238- task = asyncio.ensure_future(coro())
239- ...
240-
241226 .. important ::
242227
243228 Save a reference to the result of this function, to avoid
You can’t perform that action at this time.
0 commit comments