pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/48042c52a6b59089e7d7dda3c8fed79d646b6f8d

097560d244c08.css" /> fix outdated comments in asyncio (#121783) · python/cpython@48042c5 · GitHub
Skip to content

Commit 48042c5

Browse files
fix outdated comments in asyncio (#121783)
1 parent 50eec50 commit 48042c5

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Lib/asyncio/futures.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class Future:
4343
- This class is not compatible with the wait() and as_completed()
4444
methods in the concurrent.futures package.
4545
46-
(In Python 3.4 or later we may be able to unify the implementations.)
4746
"""
4847

4948
# Class variables serving as defaults for instance variables.
@@ -61,7 +60,7 @@ class Future:
6160
# the Future protocol (i.e. is intended to be duck-type compatible).
6261
# The value must also be not-None, to enable a subclass to declare
6362
# that it is not compatible by setting this to None.
64-
# - It is set by __iter__() below so that Task._step() can tell
63+
# - It is set by __iter__() below so that Task.__step() can tell
6564
# the difference between
6665
# `await Future()` or`yield from Future()` (correct) vs.
6766
# `yield Future()` (incorrect).

Lib/asyncio/tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def __eager_start(self):
281281
def __step(self, exc=None):
282282
if self.done():
283283
raise exceptions.InvalidStateError(
284-
f'_step(): already done: {self!r}, {exc!r}')
284+
f'__step(): already done: {self!r}, {exc!r}')
285285
if self._must_cancel:
286286
if not isinstance(exc, exceptions.CancelledError):
287287
exc = self._make_cancelled_error()
@@ -379,7 +379,7 @@ def __wakeup(self, future):
379379
else:
380380
# Don't pass the value of `future.result()` explicitly,
381381
# as `Future.__iter__` and `Future.__await__` don't need it.
382-
# If we call `_step(value, None)` instead of `_step()`,
382+
# If we call `__step(value, None)` instead of `__step()`,
383383
# Python eval loop would use `.send(value)` method call,
384384
# instead of `__next__()`, which is slower for futures
385385
# that return non-generator iterators from their `__iter__`.

Modules/_asynciomodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2892,7 +2892,7 @@ task_step_impl(asyncio_state *state, TaskObj *task, PyObject *exc)
28922892

28932893
if (task->task_state != STATE_PENDING) {
28942894
PyErr_Format(state->asyncio_InvalidStateError,
2895-
"_step(): already done: %R %R",
2895+
"__step(): already done: %R %R",
28962896
task,
28972897
exc ? exc : Py_None);
28982898
goto fail;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy