[Python-checkins] [doc] Clarify exception in `multiprocessing.cpu_count` (GH-23660) (GH-28433)

ambv webhook-mailer at python.org
Fri Sep 17 19:19:09 EDT 2021


https://github.com/python/cpython/commit/397dad4001cd402cf4843ab44963932ea81c2e73
commit: 397dad4001cd402cf4843ab44963932ea81c2e73
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2021-09-18T01:19:00+02:00
summary:

[doc] Clarify exception in `multiprocessing.cpu_count` (GH-23660) (GH-28433)

Previous wording didn't explain the slightly unintuitive behavior.

Co-authored-by: kj <28750310+Fidget-Spinner at users.noreply.github.com>
(cherry picked from commit 24dbe30f8df80740704db3743d071b3218d1276e)

Co-authored-by: Emmanuel Arias <eamanu at yaerobi.com>

files:
M Doc/library/multiprocessing.rst

diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 945ac42b2fbb3..57df89951e332 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -951,7 +951,8 @@ Miscellaneous
    use.  The number of usable CPUs can be obtained with
    ``len(os.sched_getaffinity(0))``
 
-   May raise :exc:`NotImplementedError`.
+   When the number of CPUs cannot be determined a :exc:`NotImplementedError`
+   is raised.
 
    .. seealso::
       :func:`os.cpu_count`



More information about the Python-checkins mailing list