summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGhorban M. Tavakoly <58617996+galmyk@users.noreply.github.com>2024-10-12 20:38:13 (GMT)
committerGitHub <noreply@github.com>2024-10-12 20:38:13 (GMT)
commitfa52b82c91a8e1a0971bd5fef656473ec93f41e3 (patch)
treeb12593ec2be1447834e8f6bcb454602731813cf8
parent4a2282b0679bbf7b7fbd36aae1b1565145238961 (diff)
downloadcpython-fa52b82c91a8e1a0971bd5fef656473ec93f41e3.zip
cpython-fa52b82c91a8e1a0971bd5fef656473ec93f41e3.tar.gz
cpython-fa52b82c91a8e1a0971bd5fef656473ec93f41e3.tar.bz2
gh-125289: Update sample code in asyncio-task.rst (GH-125292)
* Update sample code in asyncio-task.rst This will change **coroutines** sample code in the **Awaitables** section and make the example clearer. * Update Doc/library/asyncio-task.rst Revert the added print Co-authored-by: Carol Willing <carolcode@willingconsulting.com> * Update Doc/library/asyncio-task.rst Co-authored-by: Carol Willing <carolcode@willingconsulting.com> --------- Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
-rw-r--r--Doc/library/asyncio-task.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 4716a3f..f27e858 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -158,7 +158,7 @@ other coroutines::
# Nothing happens if we just call "nested()".
# A coroutine object is created but not awaited,
# so it *won't run at all*.
- nested()
+ nested() # will raise a "RuntimeWarning".
# Let's do it differently now and await it:
print(await nested()) # will print "42".