@@ -2116,7 +2116,7 @@ PyDoc_STRVAR(os_sched_getaffinity__doc__,
21162116"sched_getaffinity($module, pid, /)\n"
21172117"--\n"
21182118"\n"
2119- "Return the affinity of the process identified by pid.\n"
2119+ "Return the affinity of the process identified by pid (or the current process if zero) .\n"
21202120"\n"
21212121"The affinity is returned as a set of CPU identifiers." );
21222122
@@ -5178,7 +5178,11 @@ PyDoc_STRVAR(os_cpu_count__doc__,
51785178"cpu_count($module, /)\n"
51795179"--\n"
51805180"\n"
5181- "Return the number of CPUs in the system; return None if indeterminable." );
5181+ "Return the number of CPUs in the system; return None if indeterminable.\n"
5182+ "\n"
5183+ "This number is not equivalent to the number of CPUs the current process can\n"
5184+ "use. The number of usable CPUs can be obtained with\n"
5185+ "``len(os.sched_getaffinity(0))``" );
51825186
51835187#define OS_CPU_COUNT_METHODDEF \
51845188 {"cpu_count", (PyCFunction)os_cpu_count, METH_NOARGS, os_cpu_count__doc__},
@@ -5788,4 +5792,4 @@ os_set_handle_inheritable(PyModuleDef *module, PyObject *args)
57885792#ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
57895793 #define OS_SET_HANDLE_INHERITABLE_METHODDEF
57905794#endif /* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
5791- /*[clinic end generated code: output=f3f92b2d2e2c3fe3 input=a9049054013a1b77]*/
5795+ /*[clinic end generated code: output=35b50461dbecd65d input=a9049054013a1b77]*/
0 commit comments