Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12e7d10

Browse files
authored
bpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (#23192)
1 parentb05955d commit12e7d10

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎Doc/library/threading.rst‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,11 @@ This module defines the following functions:
121121

122122
..function::enumerate()
123123

124-
Return a list of all:class:`Thread` objects currently alive. The list
125-
includes daemonic threads, dummy thread objects created by
126-
:func:`current_thread`, and the main thread. It excludes terminated threads
127-
and threads that have not yet been started.
124+
Return a list of all:class:`Thread` objects currently active. The list
125+
includes daemonic threads and dummy thread objects created by
126+
:func:`current_thread`. It excludes terminated threads and threads
127+
that have not yet been started. However, the main thread is always part
128+
of the result, even when terminated.
128129

129130

130131
..function::main_thread()

‎Lib/threading.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,8 +1130,8 @@ def is_alive(self):
11301130
"""Return whether the thread is alive.
11311131
11321132
This method returns True just before the run() method starts until just
1133-
after the run() method terminates.Themodule function enumerate()
1134-
returns a list of all alive threads.
1133+
after the run() method terminates.See also themodule function
1134+
enumerate().
11351135
11361136
"""
11371137
assertself._initialized,"Thread.__init__() not called"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp