55#
66# Translators:
77# Shengjing Zhu <[email protected] >, 20218- # Arisaka97 <[email protected] >, 202198# Alpha Du <[email protected] >, 20211091110# ppcfish <[email protected] >, 2021@@ -208,49 +207,49 @@ msgstr "double"
208207
209208#: ../../library/array.rst:48
210209msgid "Notes:"
211- msgstr "注释 :"
210+ msgstr "备注 :"
212211
213212#: ../../library/array.rst:51
214213msgid "It can be 16 bits or 32 bits depending on the platform."
215- msgstr "由于平台的不同它可能为 16 位或 32 位。"
214+ msgstr "在不同的平台上,它可能为 16 位或 32 位。"
216215
217216#: ../../library/array.rst:53
218217msgid ""
219218"``array('u')`` now uses :c:type:`wchar_t` as C type instead of deprecated "
220219"``Py_UNICODE``. This change doesn't affect its behavior because "
221220"``Py_UNICODE`` is alias of :c:type:`wchar_t` since Python 3.3."
222221msgstr ""
223- "``array('u')`` 现在使用 :c:type:`wchar_t` 作为 C 类型而不是已被弃用的 ``Py_UNICODE``。 "
224- "这个改变不会影响其行为因为 ``Py_UNICODE`` 自 Python 3.3 起就是 :c:type:`wchar_t` 的别名。"
222+ "``array('u')`` 现在使用 :c:type:`wchar_t` 作为 C 类型而不是已不建议使用的 "
223+ "``Py_UNICODE``。这个改变不会影响其行为,因为 ``Py_UNICODE`` 自 Python 3.3 起就是 "
224+ ":c:type:`wchar_t` 的别名。"
225225
226226#: ../../library/array.rst:61
227227msgid ""
228228"The actual representation of values is determined by the machine "
229229"architecture (strictly speaking, by the C implementation). The actual size "
230230"can be accessed through the :attr:`array.itemsize` attribute."
231- msgstr ""
232- "值的实际表示形式是由机器架构(严格地说,是由 C 实现)决定的。 其实际大小可以通过 :attr:`array.itemsize` 属性来访问。"
231+ msgstr "值的实际表示是由机器架构(严格说是由 C 实现)决定的。实际大小可以通过 :attr:`array.itemsize` 属性来访问。"
233232
234233#: ../../library/array.rst:65
235234msgid "The module defines the following item:"
236- msgstr "模块定义了以下项目 :"
235+ msgstr "此模块定义了以下项目 :"
237236
238237#: ../../library/array.rst:70
239238msgid "A string with all available type codes."
240- msgstr "一个包含所有可用类型码的字符串 。"
239+ msgstr "一个由所有可用的类型码组成的字符串 。"
241240
242241#: ../../library/array.rst:73
243242msgid "The module defines the following type:"
244- msgstr "这个模块定义了以下类型 :"
243+ msgstr "此模块定义了以下类型 :"
245244
246245#: ../../library/array.rst:78
247246msgid ""
248247"A new array whose items are restricted by *typecode*, and initialized from "
249248"the optional *initializer* value, which must be a list, a :term:`bytes-like "
250249"object`, or iterable over elements of the appropriate type."
251250msgstr ""
252- "一个包含由 *typecode* 限制类型的条目的新数组,并由可选的 *initializer* "
253- "值进行初始化,该值必须为一个列表 、:term:`bytes-like object` 或包含正确类型元素的可迭代对象 。"
251+ "一个由 *typecode* 限制类型的新数组,并通过可选的 *initializer* 进行初始化。 *initializer* "
252+ "必须为一个列表 、:term:`bytes-like object` 或在合适类型元素上迭代的可迭代对象 。"
254253
255254#: ../../library/array.rst:83
256255msgid ""
@@ -259,9 +258,8 @@ msgid ""
259258"below) to add initial items to the array. Otherwise, the iterable "
260259"initializer is passed to the :meth:`extend` method."
261260msgstr ""
262- "如果给定一个列表或字符串,该 initializer 会被传给新数组的 :meth:`fromlist`, :meth:`frombytes` 或 "
263- ":meth:`fromunicode` 方法(见下文)以将初始条目添加到数组中。 否则会将可迭代对象作为 initializer 传给 "
264- ":meth:`extend` 方法。"
261+ "如果是一个列表或字符串,该 initializer 会被传给新数组的 :meth:`fromlist`,:meth:`frombytes` 或 "
262+ ":meth:`fromunicode` 方法(见下)以将初始项添加到数组中。其它将可迭代对象将被传给 :meth:`extend` 方法。"
265263
266264#: ../../library/array.rst:88
267265msgid ""
@@ -272,25 +270,25 @@ msgid ""
272270"interface, and may be used wherever :term:`bytes-like objects <bytes-like "
273271"object>` are supported."
274272msgstr ""
275- "数组对象支持普通的序列操作如索引、切片、拼接和重复等。 当使用切片赋值时,所赋的值必须为具有相同类型码的数组对象;所有其他情况都将引发 "
276- ":exc:`TypeError`。 数组对象也实现了缓冲区接口,可以用于所有支持 :term:`字节类对象 <bytes-like object>` "
273+ "数组对象支持普通的序列操作如索引、切片、拼接和重复等。当使用切片赋值时,所赋的值必须为具有相同类型码的数组对象;所有其他情况都将引发 "
274+ ":exc:`TypeError`。数组对象也实现了缓冲区接口,可以用于所有支持 :term:`字节类对象 <bytes-like object>` "
277275"的场合。"
278276
279277#: ../../library/array.rst:94
280278msgid ""
281279"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
282280"``typecode``, ``initializer``."
283281msgstr ""
284- "引发一个 :ref:`审计事件 <auditing>` ``array.__new__`` 附带参数 ``typecode``, "
282+ "引发一个 :ref:`审计事件 <auditing>` ``array.__new__`` 附带参数 ``typecode`` 和 "
285283"``initializer``。"
286284
287285#: ../../library/array.rst:99
288286msgid "The typecode character used to create the array."
289- msgstr "用于创建数组的类型码字符 。"
287+ msgstr "在创建数组时指定的类型码字符 。"
290288
291289#: ../../library/array.rst:104
292290msgid "The length in bytes of one array item in the internal representation."
293- msgstr "在内部表示中一个数组项的字节长度 。"
291+ msgstr "在内部表示中,单个数组项的长度,单位为字节 。"
294292
295293#: ../../library/array.rst:109
296294msgid "Append a new item with value *x* to the end of the array."
@@ -307,9 +305,10 @@ msgid ""
307305"returned numbers are valid as long as the array exists and no length-"
308306"changing operations are applied to it."
309307msgstr ""
310- "返回一个元组 ``(address, length)`` 以给出用于存放数据内容的缓冲区元素的当前内存地址和长度。 以字节表示的内存缓冲区大小可通过 "
311- "``array.buffer_info()[1] * array.itemsize`` 来计算。 这在使用需要内存地址的低层级(因此不够安全)I/O "
312- "接口时会很有用处,例如某些 :c:func:`!ioctl` 操作。 只要数组存在且没有对其应用过改变长度的操作则返回的数值就是有效的。"
308+ "返回一个元组 ``(address, length)`` "
309+ "给出存放数组内容的内存缓冲区的当前地址和长度(以元素个数为单位)。以字节为单位的的内存缓冲区大小可通过 ``array.buffer_info()[1]"
310+ " * array.itemsize`` 来计算。工作在需要内存地址的底层(因此天然地不够安全)的 I/O 接口上时,这有时会有用,例如某些 "
311+ ":c:func:`!ioctl` 操作。只要数组还存在,并且没有对其应用过改变长度的操作,则返回的数值就是有效的。"
313312
314313#: ../../library/array.rst:124
315314msgid ""
0 commit comments