|
7 | 7 | msgstr ""
|
8 | 8 | "Project-Id-Version: Python 3.12\n"
|
9 | 9 | "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" |
11 | 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
12 | 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 | 13 | "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
|
@@ -212,63 +212,79 @@ msgstr ""
|
212 | 212 | msgid ""
|
213 | 213 | "Provides a mutable list-like object where all values stored within are "
|
214 | 214 | "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." |
221 | 221 | msgstr ""
|
222 | 222 |
|
223 |
| -#: ../../library/multiprocessing.shared_memory.rst:269 |
| 223 | +#: ../../library/multiprocessing.shared_memory.rst:270 |
224 | 224 | msgid ""
|
225 | 225 | "*sequence* is used in populating a new ``ShareableList`` full of values. Set "
|
226 | 226 | "to ``None`` to instead attach to an already existing ``ShareableList`` by "
|
227 | 227 | "its unique shared memory name."
|
228 | 228 | msgstr ""
|
229 | 229 |
|
230 |
| -#: ../../library/multiprocessing.shared_memory.rst:273 |
| 230 | +#: ../../library/multiprocessing.shared_memory.rst:274 |
231 | 231 | msgid ""
|
232 | 232 | "*name* is the unique name for the requested shared memory, as described in "
|
233 | 233 | "the definition for :class:`SharedMemory`. When attaching to an existing "
|
234 | 234 | "``ShareableList``, specify its shared memory block's unique name while "
|
235 | 235 | "leaving ``sequence`` set to ``None``."
|
236 | 236 | msgstr ""
|
237 | 237 |
|
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 |
239 | 255 | msgid "Returns the number of occurrences of ``value``."
|
240 | 256 | msgstr ""
|
241 | 257 |
|
242 |
| -#: ../../library/multiprocessing.shared_memory.rst:284 |
| 258 | +#: ../../library/multiprocessing.shared_memory.rst:314 |
243 | 259 | msgid ""
|
244 | 260 | "Returns first index position of ``value``. Raises :exc:`ValueError` if "
|
245 | 261 | "``value`` is not present."
|
246 | 262 | msgstr ""
|
247 | 263 |
|
248 |
| -#: ../../library/multiprocessing.shared_memory.rst:289 |
| 264 | +#: ../../library/multiprocessing.shared_memory.rst:319 |
249 | 265 | msgid ""
|
250 | 266 | "Read-only attribute containing the :mod:`struct` packing format used by all "
|
251 | 267 | "currently stored values."
|
252 | 268 | msgstr ""
|
253 | 269 |
|
254 |
| -#: ../../library/multiprocessing.shared_memory.rst:294 |
| 270 | +#: ../../library/multiprocessing.shared_memory.rst:324 |
255 | 271 | msgid "The :class:`SharedMemory` instance where the values are stored."
|
256 | 272 | msgstr ""
|
257 | 273 |
|
258 |
| -#: ../../library/multiprocessing.shared_memory.rst:297 |
| 274 | +#: ../../library/multiprocessing.shared_memory.rst:327 |
259 | 275 | msgid ""
|
260 | 276 | "The following example demonstrates basic use of a :class:`ShareableList` "
|
261 | 277 | "instance:"
|
262 | 278 | msgstr ""
|
263 | 279 |
|
264 |
| -#: ../../library/multiprocessing.shared_memory.rst:330 |
| 280 | +#: ../../library/multiprocessing.shared_memory.rst:360 |
265 | 281 | msgid ""
|
266 | 282 | "The following example depicts how one, two, or many processes may access the "
|
267 | 283 | "same :class:`ShareableList` by supplying the name of the shared memory block "
|
268 | 284 | "behind it:"
|
269 | 285 | msgstr ""
|
270 | 286 |
|
271 |
| -#: ../../library/multiprocessing.shared_memory.rst:345 |
| 287 | +#: ../../library/multiprocessing.shared_memory.rst:375 |
272 | 288 | msgid ""
|
273 | 289 | "The following examples demonstrates that ``ShareableList`` (and underlying "
|
274 | 290 | "``SharedMemory``) objects can be pickled and unpickled if needed. Note, that "
|
|
0 commit comments