Skip to content

Commit 5e20103

Browse files
[3.13] gh-76187: Document the c typecode for multiprocessing.Array. (GH-132504) (#143370)
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 136f6d8) Co-authored-by: Tomas R <[email protected]>
1 parent c7f1e18 commit 5e20103

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Doc/library/multiprocessing.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,11 +1624,14 @@ inherited by child processes.
16241624
value is actually a synchronized wrapper for the array.
16251625

16261626
*typecode_or_type* determines the type of the elements of the returned array:
1627-
it is either a ctypes type or a one character typecode of the kind used by
1628-
the :mod:`array` module. If *size_or_initializer* is an integer, then it
1629-
determines the length of the array, and the array will be initially zeroed.
1630-
Otherwise, *size_or_initializer* is a sequence which is used to initialize
1631-
the array and whose length determines the length of the array.
1627+
it is either a :ref:`ctypes type <ctypes-fundamental-data-types>` or a one
1628+
character typecode of the kind used by the :mod:`array` module with the
1629+
exception of ``'w'``, which is not supported. In addition, the ``'c'``
1630+
typecode is an alias for :class:`ctypes.c_char`. If *size_or_initializer*
1631+
is an integer, then it determines the length of the array, and the array
1632+
will be initially zeroed. Otherwise, *size_or_initializer* is a sequence
1633+
which is used to initialize the array and whose length determines the length
1634+
of the array.
16321635

16331636
If *lock* is ``True`` (the default) then a new lock object is created to
16341637
synchronize access to the value. If *lock* is a :class:`Lock` or

0 commit comments

Comments
 (0)