@@ -20,7 +20,7 @@ msgid ""
2020msgstr ""
2121"Project-Id-Version : Python 3.8\n "
2222"Report-Msgid-Bugs-To : \n "
23- "POT-Creation-Date : 2020-02-26 12:47 +0000\n "
23+ "POT-Creation-Date : 2020-08-20 14:53 +0000\n "
2424"PO-Revision-Date : 2020-05-30 11:47+0000\n "
2525"
Last-Translator :
Naisen Xu <[email protected] >, 2020\n "
2626"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -291,10 +291,8 @@ msgstr "``S`` (:class:`bytes`) [PyBytesObject \\*]"
291291msgid ""
292292"Requires that the Python object is a :class:`bytes` object, without "
293293"attempting any conversion. Raises :exc:`TypeError` if the object is not a "
294- "bytes object. The C variable may also be declared as :c:type:`PyObject\\ *`."
294+ "bytes object. The C variable may also be declared as :c:type:`PyObject*`."
295295msgstr ""
296- "要求 Python 对象是一个 :class:`bytes` 类型对象,没有尝试任何的转换。如果不是一个字节类型对象会引发 "
297- ":exc:`TypeError` 异常。C 变量也可能声明为 :c:type:`PyObject\\ *` 类型。"
298296
299297#: ../../c-api/arg.rst:139
300298msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\ *]"
@@ -305,10 +303,8 @@ msgid ""
305303"Requires that the Python object is a :class:`bytearray` object, without "
306304"attempting any conversion. Raises :exc:`TypeError` if the object is not a "
307305":class:`bytearray` object. The C variable may also be declared as "
308- ":c:type:`PyObject\\ *`."
306+ ":c:type:`PyObject*`."
309307msgstr ""
310- "要求 Python 对象是一个 :class:`bytearray` 类型对象,没有尝试任何的转换。如果不是一个 :class:`bytearray` "
311- "类型对象会引发 :exc:`TypeError` 异常。C 变量也可能声明为 :c:type:`PyObject\\ *` 类型。"
312308
313309#: ../../c-api/arg.rst:156
314310msgid "``u`` (:class:`str`) [const Py_UNICODE \\ *]"
@@ -386,10 +382,8 @@ msgstr "``U`` (:class:`str`) [PyObject \\*]"
386382msgid ""
387383"Requires that the Python object is a Unicode object, without attempting any "
388384"conversion. Raises :exc:`TypeError` if the object is not a Unicode object."
389- " The C variable may also be declared as :c:type:`PyObject\\ *`."
385+ " The C variable may also be declared as :c:type:`PyObject*`."
390386msgstr ""
391- "要求 Python 对象是一个 Unicode 对象,没有尝试任何的转换。如果不是一个 Unicode 对象会引发 :exc:`TypeError` "
392- "异常。C 变量也可能声明为 :c:type:`PyObject\\ *` 类型。"
393387
394388#: ../../c-api/arg.rst:192
395389msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]"
@@ -418,17 +412,13 @@ msgstr "``s`` 的变式,它将编码后的 Unicode 字符存入字符缓冲区
418412#: ../../c-api/arg.rst:198
419413msgid ""
420414"This format requires two arguments. The first is only used as input, and "
421- "must be a :c:type:`const char\\ *` which points to the name of an encoding as"
422- " a NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is"
423- " used. An exception is raised if the named encoding is not known to Python."
424- " The second argument must be a :c:type:`char\\ *\\ *`; the value of the "
425- "pointer it references will be set to a buffer with the contents of the "
426- "argument text. The text will be encoded in the encoding specified by the "
427- "first argument."
428- msgstr ""
429- "此格式需要两个参数。 第一个仅用作输入,并且必须是 :c:type:`const char\\ *`,该名称将编码的名称指向 NUL "
430- "终止字符串或\" NULL\" ,在这种情况下,使用 ``'utf-8'`` 编码。如果 Python 不知道命名编码,则引发异常。 第二个参数必须为 "
431- ":c:type:`char\\ *\\ *` 它引用的指针的值将设置为包含参数文本内容的缓冲区。文本将以第一个参数指定的编码进行编码。"
415+ "must be a :c:type:`const char*` which points to the name of an encoding as a"
416+ " NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is "
417+ "used. An exception is raised if the named encoding is not known to Python. "
418+ "The second argument must be a :c:type:`char**`; the value of the pointer it "
419+ "references will be set to a buffer with the contents of the argument text. "
420+ "The text will be encoded in the encoding specified by the first argument."
421+ msgstr ""
432422
433423#: ../../c-api/arg.rst:206
434424msgid ""
@@ -473,19 +463,15 @@ msgstr "``s#`` 的变式,它将已编码的 Unicode 字符存入字符缓冲
473463#: ../../c-api/arg.rst:221
474464msgid ""
475465"It requires three arguments. The first is only used as input, and must be a"
476- " :c:type:`const char\\ *` which points to the name of an encoding as a NUL-"
466+ " :c:type:`const char*` which points to the name of an encoding as a NUL-"
477467"terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. "
478468"An exception is raised if the named encoding is not known to Python. The "
479- "second argument must be a :c:type:`char\\ * \\ *`; the value of the pointer it "
469+ "second argument must be a :c:type:`char* *`; the value of the pointer it "
480470"references will be set to a buffer with the contents of the argument text. "
481471"The text will be encoded in the encoding specified by the first argument. "
482472"The third argument must be a pointer to an integer; the referenced integer "
483473"will be set to the number of bytes in the output buffer."
484474msgstr ""
485- "它需要三个参数。 第一个仅用作输入,并且必须为 :c:type:`const char\\ *`,该对象指向一个编码格式名称,形式为以 NUL "
486- "结束的字符串或 ``NULL``,在后一种情况下将使用 ``'utf-8'`` 编码格式。 如果编码格式名称无法被 Python 识别则会引发异常。 "
487- "第二个参数必须为 :c:type:`char\\ *\\ *`;它所引用的指针的值将被设为包含参数文本内容的缓冲区。 "
488- "文本将以第一个参数所指定的编码格式进行编码。 第三个参数必须是指向一个整数的指针;所引用的整数将被设为输出缓冲区中的字节数。"
489475
490476#: ../../c-api/arg.rst:231
491477msgid "There are two modes of operation:"
@@ -716,13 +702,10 @@ msgstr "``O!`` (object) [*typeobject*, PyObject \\*]"
716702msgid ""
717703"Store a Python object in a C object pointer. This is similar to ``O``, but "
718704"takes two C arguments: the first is the address of a Python type object, the"
719- " second is the address of the C variable (of type :c:type:`PyObject\\ *`) "
720- "into which the object pointer is stored. If the Python object does not have"
721- " the required type, :exc:`TypeError` is raised."
705+ " second is the address of the C variable (of type :c:type:`PyObject*`) into "
706+ "which the object pointer is stored. If the Python object does not have the "
707+ "required type, :exc:`TypeError` is raised."
722708msgstr ""
723- "将一个 Python 对象存入一个 C 指针。和 ``O`` 类似,但是需要两个 C 参数:第一个是 Python "
724- "类型对象的地址,第二个是存储对象指针的 C 变量( :c:type:`PyObject\\ *` 变量)的地址。如果 Python 对象类型不对,会抛出 "
725- ":exc:`TypeError` 异常。"
726709
727710#: ../../c-api/arg.rst:352 ../../c-api/arg.rst:657
728711msgid "``O&`` (object) [*converter*, *anything*]"
@@ -732,24 +715,19 @@ msgstr "``O&`` (object) [*converter*, *anything*]"
732715msgid ""
733716"Convert a Python object to a C variable through a *converter* function. "
734717"This takes two arguments: the first is a function, the second is the address"
735- " of a C variable (of arbitrary type), converted to :c:type:`void \\ *`. The "
718+ " of a C variable (of arbitrary type), converted to :c:type:`void *`. The "
736719"*converter* function in turn is called as follows::"
737720msgstr ""
738- "通过一个 *converter* 函数将一个 Python 对象转换成一个 C 变量。这需要两个参数:第一个是一个函数,第二个是一个 C "
739- "变量的地址(任意类型的),转化为 :c:type:`void \\ *` 类型。*converter* 函数像这样被调用:"
740721
741722#: ../../c-api/arg.rst:339
742723msgid ""
743724"where *object* is the Python object to be converted and *address* is the "
744- ":c:type:`void\\ *` argument that was passed to the :c:func:`PyArg_Parse\\ *` "
725+ ":c:type:`void*` argument that was passed to the :c:func:`PyArg_Parse\\ *` "
745726"function. The returned *status* should be ``1`` for a successful conversion "
746727"and ``0`` if the conversion has failed. When the conversion fails, the "
747728"*converter* function should raise an exception and leave the content of "
748729"*address* unmodified."
749730msgstr ""
750- "*object*是待转化的Python对象并且 *address* 是传入 :c:func:`PyArg_Parse\\ *` 函数的 "
751- ":c:type:`void\\ *` 类型参数。返回的 *status* "
752- "是1代表转换成功,0代表转换失败。当转换失败,*converter*函数会引发一个异常并且不会修改 *address* 的内容。"
753731
754732#: ../../c-api/arg.rst:345
755733msgid ""
@@ -972,20 +950,13 @@ msgid ""
972950"should be passed as *args*; it must actually be a tuple. The length of the "
973951"tuple must be at least *min* and no more than *max*; *min* and *max* may be "
974952"equal. Additional arguments must be passed to the function, each of which "
975- "should be a pointer to a :c:type:`PyObject\\ *` variable; these will be "
976- "filled in with the values from *args*; they will contain borrowed "
977- "references. The variables which correspond to optional parameters not given"
978- " by *args* will not be filled in; these should be initialized by the caller."
979- " This function returns true on success and false if *args* is not a tuple or"
980- " contains the wrong number of elements; an exception will be set if there "
981- "was a failure."
982- msgstr ""
983- "一个不使用格式化字符串指定参数类型的简单形式的参数检索。使用这种方法来检索参数的函数应该在函数或者方法表中声明 "
984- ":const:`METH_VARARGS`。包含实际参数的元组应该以 *args* 形式被传入;它必须是一个实际的元组。元组的长度必须至少是 *min*"
985- " 并且不超过 *max*; *min* 和 *max* 可能相同。额外的参数必须传递给函数,每一个参数必须是一个指向 "
986- ":c:type:`PyObject\\ *` 类型变量的指针;它们将被赋值为 *args* 的值;它们将包含借来的引用。不在 *args* "
987- "里面的可选参数不会被赋值;由调用者完成初始化。函数成功则返回 true 并且如果 *args* 不是元组或者包含错误数量的元素则返回 "
988- "false;如果失败了会引发一个异常。"
953+ "should be a pointer to a :c:type:`PyObject*` variable; these will be filled "
954+ "in with the values from *args*; they will contain borrowed references. The "
955+ "variables which correspond to optional parameters not given by *args* will "
956+ "not be filled in; these should be initialized by the caller. This function "
957+ "returns true on success and false if *args* is not a tuple or contains the "
958+ "wrong number of elements; an exception will be set if there was a failure."
959+ msgstr ""
989960
990961#: ../../c-api/arg.rst:493
991962msgid ""
@@ -1279,11 +1250,9 @@ msgstr "和 ``O`` 相同,然而它并不增加对象的引用计数。当通
12791250msgid ""
12801251"Convert *anything* to a Python object through a *converter* function. The "
12811252"function is called with *anything* (which should be compatible with "
1282- ":c:type:`void \\ *`) as its argument and should return a \" new\" Python "
1283- "object, or ``NULL`` if an error occurred."
1253+ ":c:type:`void*`) as its argument and should return a \" new\" Python object, "
1254+ "or ``NULL`` if an error occurred."
12841255msgstr ""
1285- "通过 *converter* 函数将 *anything* 转换为 Python 对象。 该函数以 *anything* (应与 "
1286- ":c:type:`void \\ *` 兼容)作为其参数,应返回 \" new\" Python 对象,如果发生错误,则应返回 ``NULL``。"
12871256
12881257#: ../../c-api/arg.rst:660
12891258msgid ""
0 commit comments