1010# cdarlint <cdarling@126.com>, 2019
1111# QR Wang <wangqirui1996@gmail.com>, 2019
1212# 刘玉龙 <banbooliu@gmail.com>, 2019
13- # Freesand Leo <yuqinju@163.com>, 2019
1413# dannyvi <dannyvis@icloud.com>, 2019
1514# Naisen Xu <723648649@qq.com>, 2019
15+ # taotieren <admin@taotieren.com>, 2020
16+ # Freesand Leo <yuqinju@163.com>, 2020
1617#
1718#, fuzzy
1819msgid ""
@@ -21,7 +22,7 @@ msgstr ""
2122"Report-Msgid-Bugs-To : \n "
2223"POT-Creation-Date : 2020-01-01 04:28+0000\n "
2324"PO-Revision-Date : 2019-09-01 03:38+0000\n "
24- "Last-Translator : Naisen Xu <723648649@qq .com>, 2019 \n "
25+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2020 \n "
2526"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2627"MIME-Version : 1.0\n "
2728"Content-Type : text/plain; charset=UTF-8\n "
@@ -112,6 +113,9 @@ msgid ""
112113"object's :c:member:`PyBufferProcs.bf_releasebuffer` field is ``NULL``, which"
113114" disallows mutable objects such as :class:`bytearray`."
114115msgstr ""
116+ "某些格式需要只读的 :term:`bytes-like object`,并设置指针而不是缓冲区结构。 他们通过检查对象的 "
117+ ":c:member:`PyBufferProcs.bf_releasebuffer` 字段是否为 ``NULL`` 来发挥作用,该字段不允许为 "
118+ ":class:`bytearray` 这样的可变对象。"
115119
116120#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:58
117121msgid ""
@@ -206,7 +210,7 @@ msgstr "``z`` (:class:`str` or ``None``) [const char \\*]"
206210msgid ""
207211"Like ``s``, but the Python object may also be ``None``, in which case the C "
208212"pointer is set to ``NULL``."
209- msgstr ""
213+ msgstr "与 ``s`` 类似,但 Python 对象也可能为 ``None``,在这种情况下,C 指针设置为 ``NULL``。 "
210214
211215#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:106
212216msgid ""
@@ -219,6 +223,8 @@ msgid ""
219223"Like ``s*``, but the Python object may also be ``None``, in which case the "
220224"``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``."
221225msgstr ""
226+ "与 ``s*`` 类似,但 Python 对象也可能为 ``None``,在这种情况下,:c:type:`Py_buffer` 结构的 ``buf`` "
227+ "成员设置为 ``NULL``。"
222228
223229#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:110
224230msgid ""
@@ -232,7 +238,7 @@ msgstr ""
232238msgid ""
233239"Like ``s#``, but the Python object may also be ``None``, in which case the C"
234240" pointer is set to ``NULL``."
235- msgstr ""
241+ msgstr "与 ``s#`` 类似,但 Python 对象也可能为 ``None``,在这种情况下,C 指针设置为 ``NULL``。 "
236242
237243#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:120
238244msgid "``y`` (read-only :term:`bytes-like object`) [const char \\ *]"
@@ -350,6 +356,8 @@ msgid ""
350356"Like ``u``, but the Python object may also be ``None``, in which case the "
351357":c:type:`Py_UNICODE` pointer is set to ``NULL``."
352358msgstr ""
359+ "与 ``u`` 类似,但 Python 对象也可能为 ``None``,在这种情况下 :c:type:`Py_UNICODE` 指针设置为 "
360+ "``NULL``。"
353361
354362#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:181
355363msgid "``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \\ *, int]"
@@ -360,6 +368,8 @@ msgid ""
360368"Like ``u#``, but the Python object may also be ``None``, in which case the "
361369":c:type:`Py_UNICODE` pointer is set to ``NULL``."
362370msgstr ""
371+ "与 ``u#`` 类似,但 Python 对象也可能为 ``None``,在这种情况下 :c:type:`Py_UNICODE` 指针设置为 "
372+ "``NULL``。"
363373
364374#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:186
365375msgid "``U`` (:class:`str`) [PyObject \\ *]"
@@ -409,6 +419,9 @@ msgid ""
409419"argument text. The text will be encoded in the encoding specified by the "
410420"first argument."
411421msgstr ""
422+ "此格式需要两个参数。 第一个仅用作输入,并且必须是 :c:type:`const char\\ *`,该名称将编码的名称指向 NUL "
423+ "终止字符串或\" NULL\" ,在这种情况下,使用 ``'utf-8'`` 编码。如果 Python 不知道命名编码,则引发异常。 第二个参数必须为 "
424+ ":c:type:`char\\ *\\ *` 它引用的指针的值将设置为包含参数文本内容的缓冲区。文本将以第一个参数指定的编码进行编码。"
412425
413426#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:206
414427msgid ""
@@ -462,6 +475,10 @@ msgid ""
462475"The third argument must be a pointer to an integer; the referenced integer "
463476"will be set to the number of bytes in the output buffer."
464477msgstr ""
478+ "它需要三个参数。 第一个仅用作输入,并且必须为 :c:type:`const char\\ *`,该对象指向一个编码格式名称,形式为以 NUL "
479+ "结束的字符串或 ``NULL``,在后一种情况下将使用 ``'utf-8'`` 编码格式。 如果编码格式名称无法被 Python 识别则会引发异常。 "
480+ "第二个参数必须为 :c:type:`char\\ *\\ *`;它所引用的指针的值将被设为包含参数文本内容的缓冲区。 "
481+ "文本将以第一个参数所指定的编码格式进行编码。 第三个参数必须是指向一个整数的指针;所引用的整数将被设为输出缓冲区中的字节数。"
465482
466483#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:231
467484msgid "There are two modes of operation:"
@@ -475,6 +492,8 @@ msgid ""
475492"responsible for calling :c:func:`PyMem_Free` to free the allocated buffer "
476493"after usage."
477494msgstr ""
495+ "如果 *\\ *buffer* 指向 ``NULL`` 指针,则函数将分配所需大小的缓冲区,将编码的数据复制到此缓冲区,并设置 *\\ *buffer* "
496+ "以引用新分配的存储。 呼叫者负责调用 :c:func:`PyMem_Free` 以在使用后释放分配的缓冲区。"
478497
479498#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:238
480499msgid ""
@@ -484,6 +503,9 @@ msgid ""
484503"will then copy the encoded data into the buffer and NUL-terminate it. If "
485504"the buffer is not large enough, a :exc:`ValueError` will be set."
486505msgstr ""
506+ "如果 *\\ *buffer* 指向非 ``NULL`` 指针(已分配的缓冲区),则 :c:func:`PyArg_ParseTuple` "
507+ "将使用此位置作为缓冲区,并将 *\\ *buffer_length* 的初始值解释为缓冲区大小。 然后,它将将编码的数据复制到缓冲区,并终止它。 "
508+ "如果缓冲区不够大,将设置一个 :exc:`ValueError`。"
487509
488510#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:244
489511msgid ""
@@ -688,6 +710,8 @@ msgid ""
688710" program thus receives the actual object that was passed. The object's "
689711"reference count is not increased. The pointer stored is not ``NULL``."
690712msgstr ""
713+ "将 Python 对象(不进行任何转换)存储在 C 对象指针中。 因此,C 程序接收已传递的实际对象。 对象的引用计数不会增加。 存储的指针不是 "
714+ "``NULL``。"
691715
692716#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:327
693717msgid "``O!`` (object) [*typeobject*, PyObject \\ *]"
@@ -741,6 +765,10 @@ msgid ""
741765"call, the *object* parameter will be ``NULL``; *address* will have the same "
742766"value as in the original call."
743767msgstr ""
768+ "如果 *converter* 返回 "
769+ "``Py_CLEANUP_SUPPORTED``,则如果参数解析最终失败,它可能会再次调用该函数,从而使转换器有机会释放已分配的任何内存。在第二个调用中,*object*"
770+ " 参数将为 ``NULL``;因此,该参数将为 ``NULL``;因此,该参数将为 ``NULL``,因此,该参数将为 ``NULL``(如果值)为 "
771+ "``NULL`` *address* 的值与原始呼叫中的值相同。"
744772
745773#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:351
746774msgid "``Py_CLEANUP_SUPPORTED`` was added."
@@ -903,6 +931,9 @@ msgid ""
903931"on success; on failure, it returns false and raises the appropriate "
904932"exception."
905933msgstr ""
934+ "分析将位置参数和关键字参数同时转换为局部变量的函数的参数。 *keywords* 参数是关键字参数名称的 ``NULL`` 终止数组。 空名称表示 "
935+ ":ref:`positional-only parameters <positional-only_parameter>`。成功时返回 "
936+ "true;发生故障时,它将返回 false 并引发相应的异常。"
906937
907938#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:445
908939msgid ""
@@ -988,6 +1019,8 @@ msgid ""
9881019"Returns the value or ``NULL`` in the case of an error; an exception will be "
9891020"raised if ``NULL`` is returned."
9901021msgstr ""
1022+ "基于类似于 :c:func:`PyArg_Parse\\ *` 函数系列和一系列值的格式字符串创建新值。 在出现错误时返回值或 ``NULL``;如果返回"
1023+ " ``NULL``,将引发异常。"
9911024
9921025#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:526
9931026msgid ""
@@ -1042,6 +1075,8 @@ msgid ""
10421075"Convert a null-terminated C string to a Python :class:`str` object using "
10431076"``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used."
10441077msgstr ""
1078+ "使用 ``'utf-8'`` 编码将空终止的 C 字符串转换为 Python :class:`str` 对象。如果 C 字符串指针为 "
1079+ "``NULL``,则使用 ``None``。"
10451080
10461081#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:555
10471082msgid "``s#`` (:class:`str` or ``None``) [const char \\ *, int]"
@@ -1053,6 +1088,8 @@ msgid ""
10531088"``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is "
10541089"ignored and ``None`` is returned."
10551090msgstr ""
1091+ "使用 ``'utf-8'`` 编码将 C 字符串及其长度转换为 Python :class:`str` 对象。如果 C 字符串指针为 "
1092+ "``NULL``,则长度将被忽略,并返回 ``None``。"
10561093
10571094#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:559
10581095msgid "``y`` (:class:`bytes`) [const char \\ *]"
@@ -1063,6 +1100,7 @@ msgid ""
10631100"This converts a C string to a Python :class:`bytes` object. If the C string"
10641101" pointer is ``NULL``, ``None`` is returned."
10651102msgstr ""
1103+ "这将 C 字符串转换为 Python :class:`bytes` 对象。 如果 C 字符串指针为 ``NULL``,则返回 ``None``。"
10661104
10671105#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:563
10681106msgid "``y#`` (:class:`bytes`) [const char \\ *, int]"
@@ -1072,7 +1110,7 @@ msgstr "``y#`` (:class:`bytes`) [const char \\*, int]"
10721110msgid ""
10731111"This converts a C string and its lengths to a Python object. If the C "
10741112"string pointer is ``NULL``, ``None`` is returned."
1075- msgstr ""
1113+ msgstr "这会将 C 字符串及其长度转换为一个 Python 对象。 如果该 C 字符串指针为 ``NULL``,则返回 ``None``。 "
10761114
10771115#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:566
10781116#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:582
@@ -1098,6 +1136,8 @@ msgid ""
10981136"UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is "
10991137"``NULL``, ``None`` is returned."
11001138msgstr ""
1139+ "将空终止的 :c:type:`wchar_t` 的 Unicode (UTF-16 或 UCS-4) 数据缓冲区转换为 Python Unicode "
1140+ "对象。 如果 Unicode 缓冲区指针为 ``NULL``,则返回 ``None``。"
11011141
11021142#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:579
11031143msgid "``u#`` (:class:`str`) [const wchar_t \\ *, int]"
@@ -1109,6 +1149,8 @@ msgid ""
11091149"Unicode object. If the Unicode buffer pointer is ``NULL``, the length is "
11101150"ignored and ``None`` is returned."
11111151msgstr ""
1152+ "将 Unicode (UTF-16 或 UCS-4) 数据缓冲区及其长度转换为 Python Unicode 对象。 如果 Unicode "
1153+ "缓冲区指针为 ``NULL``,则长度将被忽略,并返回 ``None``。"
11121154
11131155#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:582
11141156msgid "``U`` (:class:`str` or ``None``) [const char \\ *]"
@@ -1207,6 +1249,9 @@ msgid ""
12071249"return ``NULL`` but won't raise an exception. If no exception has been "
12081250"raised yet, :exc:`SystemError` is set."
12091251msgstr ""
1252+ "将 Python 对象传递不变(其引用计数除外,该计数由 1 递增)。 如果传入的对象是 ``NULL`` "
1253+ "指针,则假定这是由于生成参数的调用发现错误并设置异常而引起的。因此,:c:func:`Py_BuildValue` 将返回 "
1254+ "``NULL``,但不会引发异常。 如果尚未引发异常,则设置 :exc:`SystemError`。"
12101255
12111256#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:646
12121257msgid "``S`` (object) [PyObject \\ *]"
@@ -1234,6 +1279,8 @@ msgid ""
12341279":c:type:`void \\ *`) as its argument and should return a \" new\" Python "
12351280"object, or ``NULL`` if an error occurred."
12361281msgstr ""
1282+ "通过 *converter* 函数将 *anything* 转换为 Python 对象。 该函数以 *anything* (应与 "
1283+ ":c:type:`void \\ *` 兼容)作为其参数,应返回 \" new\" Python 对象,如果发生错误,则应返回 ``NULL``。"
12371284
12381285#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:660
12391286msgid ""
@@ -1266,7 +1313,7 @@ msgstr "将一个C变量序列转换成Python字典。每一对连续的C变量
12661313msgid ""
12671314"If there is an error in the format string, the :exc:`SystemError` exception "
12681315"is set and ``NULL`` returned."
1269- msgstr ""
1316+ msgstr "如果格式字符串中出现错误,则设置 :exc:`SystemError` 异常并返回 ``NULL``。 "
12701317
12711318#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/arg.rst:675
12721319msgid ""
0 commit comments