From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 2 Jan 2026 19:24:06 +0000 (+0100) Subject: [3.14] gh-76187: Document the `c` typecode for `multiprocessing.Array`. (GH-132504... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98bb48e55c5567208f17c1af49b920dfcba7337a;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-76187: Document the `c` typecode for `multiprocessing.Array`. (GH-132504) (#143369) gh-76187: Document the `c` typecode for `multiprocessing.Array`. (GH-132504) * Document the `c` typecode for `multiprocessing.Array`. * Add quotes * Mention that 'w' is not supported (cherry picked from commit 136f6d835588e0f72cecdff855afc8f424381ed5) Co-authored-by: Tomas R --- diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 382a0abedfc3..88813c6f1a4b 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -1693,11 +1693,14 @@ inherited by child processes. value is actually a synchronized wrapper for the array. *typecode_or_type* determines the type of the elements of the returned array: - it is either a ctypes type or a one character typecode of the kind used by - the :mod:`array` module. If *size_or_initializer* is an integer, then it - determines the length of the array, and the array will be initially zeroed. - Otherwise, *size_or_initializer* is a sequence which is used to initialize - the array and whose length determines the length of the array. + it is either a :ref:`ctypes type ` or a one + character typecode of the kind used by the :mod:`array` module with the + exception of ``'w'``, which is not supported. In addition, the ``'c'`` + typecode is an alias for :class:`ctypes.c_char`. If *size_or_initializer* + is an integer, then it determines the length of the array, and the array + will be initially zeroed. Otherwise, *size_or_initializer* is a sequence + which is used to initialize the array and whose length determines the length + of the array. If *lock* is ``True`` (the default) then a new lock object is created to synchronize access to the value. If *lock* is a :class:`Lock` or