[Python-checkins] Improve threading.daemon docstring (GH-14278)
Miss Islington (bot)
webhook-mailer at python.org
Sun Jun 23 15:08:31 EDT 2019
https://github.com/python/cpython/commit/03464483964fbf5a15b2b8fa6ecbf02c712ceef3
commit: 03464483964fbf5a15b2b8fa6ecbf02c712ceef3
branch: 2.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-23T12:08:28-07:00
summary:
Improve threading.daemon docstring (GH-14278)
Rephrase and clarify that "the entire Python program exits when only daemon threads are left". This matches the documentation at https://docs.python.org/3/library/threading.htmlGH-thread-objects.
(cherry picked from commit bb110cc2ed81447fb48805f31146cf31323a8fc3)
Co-authored-by: mbarkhau <mbarkhau at gmail.com>
files:
M Lib/threading.py
diff --git a/Lib/threading.py b/Lib/threading.py
index 527f20acc60c..b08374a9639c 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -1005,8 +1005,7 @@ def daemon(self):
main thread is not a daemon thread and therefore all threads created in
the main thread default to daemon = False.
- The entire Python program exits when no alive non-daemon threads are
- left.
+ The entire Python program exits when only daemon threads are left.
"""
assert self.__initialized, "Thread.__init__() not called"
More information about the Python-checkins
mailing list