File tree 1 file changed +1
-16
lines changed
1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ Coroutines
20
20
21
21
:term: `Coroutines <coroutine> ` declared with the async/await syntax is the
22
22
preferred 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,
24
24
and then prints "world"::
25
25
26
26
>>> import asyncio
@@ -223,21 +223,6 @@ Creating Tasks
223
223
:exc: `RuntimeError ` is raised if there is no running loop in
224
224
current thread.
225
225
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
-
241
226
.. important ::
242
227
243
228
Save a reference to the result of this function, to avoid
You can’t perform that action at this time.
0 commit comments