mirror of
https://github.com/python/cpython.git
synced 2026-01-27 05:05:50 +00:00
gh-76187: Document the c typecode for multiprocessing.Array. (#132504)
* Document the `c` typecode for `multiprocessing.Array`. * Add quotes * Mention that 'w' is not supported
This commit is contained in:
parent
f7a03bb944
commit
136f6d8355
@ -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 <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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user