]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148091: clarify asyncio.Future.cancel(msg) behaviour (#148248)
authorManoj K M <136242596+manoj-k-m@users.noreply.github.com>
Thu, 9 Apr 2026 14:11:31 +0000 (19:41 +0530)
committerGitHub <noreply@github.com>
Thu, 9 Apr 2026 14:11:31 +0000 (19:41 +0530)
Doc/library/asyncio-future.rst

index 4b69e569523c58b3f6a0ffaa6ae9ff6f1ae278d5..43977de273e61f6c9a3a5c26bcc03f24b05f849b 100644 (file)
@@ -196,6 +196,10 @@ Future Object
       Otherwise, change the Future's state to *cancelled*,
       schedule the callbacks, and return ``True``.
 
+      The optional string argument *msg* is passed as the argument to the
+      :exc:`CancelledError` exception raised when a cancelled Future
+      is awaited.
+
       .. versionchanged:: 3.9
          Added the *msg* parameter.