]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-76187: Document the `c` typecode for `multiprocessing.Array`. (GH-132504...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 2 Jan 2026 19:25:21 +0000 (20:25 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Jan 2026 19:25:21 +0000 (19:25 +0000)
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 <tomas.roun8@gmail.com>
Doc/library/multiprocessing.rst

index e923a8a8df573986eef693b7a6dfcbc9704463e2..70e493b3d4dc752a39276c5c824e1a8323d9727e 100644 (file)
@@ -1624,11 +1624,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 <ctypes-fundamental-data-types>` 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