Skip to content

Commit 3f6776a

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython 3d15c8b8
1 parent 03592d4 commit 3f6776a

File tree

3 files changed

+632
-487
lines changed

3 files changed

+632
-487
lines changed

library/multiprocessing.shared_memory.po

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-05-09 00:15+0000\n"
10+
"POT-Creation-Date: 2023-07-26 00:03+0000\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -212,63 +212,79 @@ msgstr ""
212212
msgid ""
213213
"Provides a mutable list-like object where all values stored within are "
214214
"stored in a shared memory block. This constrains storable values to only "
215-
"the ``int``, ``float``, ``bool``, ``str`` (less than 10M bytes each), "
216-
"``bytes`` (less than 10M bytes each), and ``None`` built-in data types. It "
217-
"also notably differs from the built-in ``list`` type in that these lists can "
218-
"not change their overall length (i.e. no append, insert, etc.) and do not "
219-
"support the dynamic creation of new :class:`ShareableList` instances via "
220-
"slicing."
215+
"the ``int`` (signed 64-bit), ``float``, ``bool``, ``str`` (less than 10M "
216+
"bytes each when encoded as utf-8), ``bytes`` (less than 10M bytes each), and "
217+
"``None`` built-in data types. It also notably differs from the built-in "
218+
"``list`` type in that these lists can not change their overall length (i.e. "
219+
"no append, insert, etc.) and do not support the dynamic creation of new :"
220+
"class:`ShareableList` instances via slicing."
221221
msgstr ""
222222

223-
#: ../../library/multiprocessing.shared_memory.rst:269
223+
#: ../../library/multiprocessing.shared_memory.rst:270
224224
msgid ""
225225
"*sequence* is used in populating a new ``ShareableList`` full of values. Set "
226226
"to ``None`` to instead attach to an already existing ``ShareableList`` by "
227227
"its unique shared memory name."
228228
msgstr ""
229229

230-
#: ../../library/multiprocessing.shared_memory.rst:273
230+
#: ../../library/multiprocessing.shared_memory.rst:274
231231
msgid ""
232232
"*name* is the unique name for the requested shared memory, as described in "
233233
"the definition for :class:`SharedMemory`. When attaching to an existing "
234234
"``ShareableList``, specify its shared memory block's unique name while "
235235
"leaving ``sequence`` set to ``None``."
236236
msgstr ""
237237

238-
#: ../../library/multiprocessing.shared_memory.rst:280
238+
#: ../../library/multiprocessing.shared_memory.rst:281
239+
msgid ""
240+
"A known issue exists for :class:`bytes` and :class:`str` values. If they end "
241+
"with ``\\x00`` nul bytes or characters, those may be *silently stripped* "
242+
"when fetching them by index from the :class:`ShareableList`. This ``."
243+
"rstrip(b'\\x00')`` behavior is considered a bug and may go away in the "
244+
"future. See :gh:`106939`."
245+
msgstr ""
246+
247+
#: ../../library/multiprocessing.shared_memory.rst:287
248+
msgid ""
249+
"For applications where rstripping of trailing nulls is a problem, work "
250+
"around it by always unconditionally appending an extra non-0 byte to the end "
251+
"of such values when storing and unconditionally removing it when fetching:"
252+
msgstr ""
253+
254+
#: ../../library/multiprocessing.shared_memory.rst:310
239255
msgid "Returns the number of occurrences of ``value``."
240256
msgstr ""
241257

242-
#: ../../library/multiprocessing.shared_memory.rst:284
258+
#: ../../library/multiprocessing.shared_memory.rst:314
243259
msgid ""
244260
"Returns first index position of ``value``. Raises :exc:`ValueError` if "
245261
"``value`` is not present."
246262
msgstr ""
247263

248-
#: ../../library/multiprocessing.shared_memory.rst:289
264+
#: ../../library/multiprocessing.shared_memory.rst:319
249265
msgid ""
250266
"Read-only attribute containing the :mod:`struct` packing format used by all "
251267
"currently stored values."
252268
msgstr ""
253269

254-
#: ../../library/multiprocessing.shared_memory.rst:294
270+
#: ../../library/multiprocessing.shared_memory.rst:324
255271
msgid "The :class:`SharedMemory` instance where the values are stored."
256272
msgstr ""
257273

258-
#: ../../library/multiprocessing.shared_memory.rst:297
274+
#: ../../library/multiprocessing.shared_memory.rst:327
259275
msgid ""
260276
"The following example demonstrates basic use of a :class:`ShareableList` "
261277
"instance:"
262278
msgstr ""
263279

264-
#: ../../library/multiprocessing.shared_memory.rst:330
280+
#: ../../library/multiprocessing.shared_memory.rst:360
265281
msgid ""
266282
"The following example depicts how one, two, or many processes may access the "
267283
"same :class:`ShareableList` by supplying the name of the shared memory block "
268284
"behind it:"
269285
msgstr ""
270286

271-
#: ../../library/multiprocessing.shared_memory.rst:345
287+
#: ../../library/multiprocessing.shared_memory.rst:375
272288
msgid ""
273289
"The following examples demonstrates that ``ShareableList`` (and underlying "
274290
"``SharedMemory``) objects can be pickled and unpickled if needed. Note, that "

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy