]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a code snippet typo in asyncio docs (#108427)
authorA <5249513+Dumeng@users.noreply.github.com>
Thu, 24 Aug 2023 16:27:54 +0000 (00:27 +0800)
committerGitHub <noreply@github.com>
Thu, 24 Aug 2023 16:27:54 +0000 (16:27 +0000)
Doc/library/asyncio-task.rst

index 1c419728c9a482e58a87978807670eba03aac92b..39c1e939d91652434dc389085ea5fe5fa25b8a7e 100644 (file)
@@ -592,7 +592,7 @@ Shielding From Cancellation
 
    is equivalent to::
 
-       res = await something()
+       res = await shield(something())
 
    *except* that if the coroutine containing it is cancelled, the
    Task running in ``something()`` is not cancelled.  From the point