@@ -77,9 +77,9 @@ def __init__(self, coro, *, loop=None):
77
77
# status is still pending
78
78
self ._log_destroy_pending = True
79
79
80
- # On Python 3.3 or older, objects with a destructor part of a reference
81
- # cycle are never destroyed. It 's not more the case on Python 3.4 thanks to
82
- # the PEP 442.
80
+ # On Python 3.3 or older, objects with a destructor that are part of a
81
+ # reference cycle are never destroyed. That 's not the case any more on
82
+ # Python 3.4 thanks to the PEP 442.
83
83
if _PY34 :
84
84
def __del__ (self ):
85
85
if self ._state == futures ._PENDING and self ._log_destroy_pending :
@@ -155,7 +155,8 @@ def print_stack(self, *, limit=None, file=None):
155
155
This produces output similar to that of the traceback module,
156
156
for the frames retrieved by get_stack(). The limit argument
157
157
is passed to get_stack(). The file argument is an I/O stream
158
- to which the output goes; by default it goes to sys.stderr.
158
+ to which the output is written; by default output is written
159
+ to sys.stderr.
159
160
"""
160
161
extracted_list = []
161
162
checked = set ()
@@ -184,18 +185,18 @@ def print_stack(self, *, limit=None, file=None):
184
185
print (line , file = file , end = '' )
185
186
186
187
def cancel (self ):
187
- """Request this task to cancel itself.
188
+ """Request that this task cancel itself.
188
189
189
190
This arranges for a CancelledError to be thrown into the
190
191
wrapped coroutine on the next cycle through the event loop.
191
192
The coroutine then has a chance to clean up or even deny
192
193
the request using try/except/finally.
193
194
194
- Contrary to Future.cancel() , this does not guarantee that the
195
+ Unlike Future.cancel, this does not guarantee that the
195
196
task will be cancelled: the exception might be caught and
196
- acted upon, delaying cancellation of the task or preventing it
197
- completely. The task may also return a value or raise a
198
- different exception.
197
+ acted upon, delaying cancellation of the task or preventing
198
+ cancellation completely. The task may also return a value or
199
+ raise a different exception.
199
200
200
201
Immediately after this method is called, Task.cancelled() will
201
202
not return True (unless the task was already cancelled). A
0 commit comments