Skip to content

Commit 98cd575

Browse files
author
Manoj
committed
Removed docstring from Lib/asyncio/futures.py and added it in Doc/library/asyncio-future.rst
1 parent a670ced commit 98cd575

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/library/asyncio-future.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ Future Object
195195
If the Future is already *done* or *cancelled*, return ``False``.
196196
Otherwise, change the Future's state to *cancelled*,
197197
schedule the callbacks, and return ``True``.
198+
199+
The optional argument *msg* is passed as the argument to the
200+
:exc:`CancelledError` exception raised when a cancelled Future
201+
is awaited. It can be any object.
198202

199203
.. versionchanged:: 3.9
200204
Added the *msg* parameter.

Lib/asyncio/futures.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ def cancel(self, msg=None):
159159
If the future is already done or cancelled, return False. Otherwise,
160160
change the future's state to cancelled, schedule the callbacks and
161161
return True.
162-
163-
The optional argument *msg* is passed as the argument to the
164-
asyncio.CancelledError exception raised when a cancelled Future
165-
is awaited. It can be any object.
166162
"""
167163
self.__log_traceback = False
168164
if self._state != _PENDING:

0 commit comments

Comments
 (0)