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
@@ -259,21 +259,6 @@ Creating Tasks
259
259
:exc: `RuntimeError ` is raised if there is no running loop in
260
260
current thread.
261
261
262
- This function has been **added in Python 3.7 **. Prior to
263
- Python 3.7, the low-level :func: `asyncio.ensure_future ` function
264
- can be used instead::
265
-
266
- async def coro():
267
- ...
268
-
269
- # In Python 3.7+
270
- task = asyncio.create_task(coro())
271
- ...
272
-
273
- # This works in all Python versions but is less readable
274
- task = asyncio.ensure_future(coro())
275
- ...
276
-
277
262
.. important ::
278
263
279
264
Save a reference to the result of this function, to avoid
You can’t perform that action at this time.
0 commit comments