Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-106939: document ShareableList nul-strip quirk. #107266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mention the int size constraint.
  • Loading branch information
gpshead committed Jul 25, 2023
commit 1013e304ab368f3486e8d123334cd45e19f9c55b
15 changes: 8 additions & 7 deletions Doc/library/multiprocessing.shared_memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,17 @@ shared memory blocks created using that manager are all released when the
:keyword:`with` statement's code block finishes execution.


.. class:: ShareableList(sequence=None, *, name=None)
.. class:: ShareableList(sequence=None, \*, name=None)

Provides a mutable list-like object where all values stored within are
stored in a shared memory block. This constrains storable values to
only the ``int``, ``float``, ``bool``, ``str`` (less than 10M bytes each),
``bytes`` (less than 10M bytes each), and ``None`` built-in data types.
It also notably differs from the built-in ``list`` type in that these
lists can not change their overall length (i.e. no append, insert, etc.)
and do not support the dynamic creation of new :class:`ShareableList`
instances via slicing.
only the ``int`` (signed 64-bit), ``float``, ``bool``, ``str`` (less
than 10M bytes each when encoded as utf-8), ``bytes`` (less than 10M
bytes each), and ``None`` built-in data types. It also notably
differs from the built-in ``list`` type in that these lists can not
change their overall length (i.e. no append, insert, etc.) and do not
support the dynamic creation of new :class:`ShareableList` instances
via slicing.

*sequence* is used in populating a new ``ShareableList`` full of values.
Set to ``None`` to instead attach to an already existing
Expand Down