Skip to content

Commit 2acb8d9

Browse files
authored
gh-148091: clarify asyncio.Future.cancel(msg) behaviour (#148248)
1 parent d11e9ff commit 2acb8d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/asyncio-future.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ Future Object
196196
Otherwise, change the Future's state to *cancelled*,
197197
schedule the callbacks, and return ``True``.
198198

199+
The optional string argument *msg* is passed as the argument to the
200+
:exc:`CancelledError` exception raised when a cancelled Future
201+
is awaited.
202+
199203
.. versionchanged:: 3.9
200204
Added the *msg* parameter.
201205

0 commit comments

Comments
 (0)