@@ -18,7 +18,7 @@ msgid ""
1818msgstr ""
1919"Project-Id-Version : Python 3.9\n "
2020"Report-Msgid-Bugs-To : \n "
21- "POT-Creation-Date : 2020-05-31 09:25 +0000\n "
21+ "POT-Creation-Date : 2020-08-20 03:54 +0000\n "
2222"PO-Revision-Date : 2017-02-16 17:33+0000\n "
2323"
Last-Translator :
Freesand Leo <[email protected] >, 2020\n "
2424"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -289,10 +289,8 @@ msgstr "``S`` (:class:`bytes`) [PyBytesObject \\*]"
289289msgid ""
290290"Requires that the Python object is a :class:`bytes` object, without "
291291"attempting any conversion. Raises :exc:`TypeError` if the object is not a "
292- "bytes object. The C variable may also be declared as :c:type:`PyObject\\ *`."
292+ "bytes object. The C variable may also be declared as :c:type:`PyObject*`."
293293msgstr ""
294- "要求 Python 对象是一个 :class:`bytes` 类型对象,没有尝试任何的转换。如果不是一个字节类型对象会引发 "
295- ":exc:`TypeError` 异常。C 变量也可能声明为 :c:type:`PyObject\\ *` 类型。"
296294
297295#: ../../c-api/arg.rst:139
298296msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\ *]"
@@ -303,10 +301,8 @@ msgid ""
303301"Requires that the Python object is a :class:`bytearray` object, without "
304302"attempting any conversion. Raises :exc:`TypeError` if the object is not a "
305303":class:`bytearray` object. The C variable may also be declared as "
306- ":c:type:`PyObject\\ *`."
304+ ":c:type:`PyObject*`."
307305msgstr ""
308- "要求 Python 对象是一个 :class:`bytearray` 类型对象,没有尝试任何的转换。如果不是一个 :class:`bytearray` "
309- "类型对象会引发 :exc:`TypeError` 异常。C 变量也可能声明为 :c:type:`PyObject\\ *` 类型。"
310306
311307#: ../../c-api/arg.rst:156
312308msgid "``u`` (:class:`str`) [const Py_UNICODE \\ *]"
@@ -384,10 +380,8 @@ msgstr "``U`` (:class:`str`) [PyObject \\*]"
384380msgid ""
385381"Requires that the Python object is a Unicode object, without attempting any "
386382"conversion. Raises :exc:`TypeError` if the object is not a Unicode object."
387- " The C variable may also be declared as :c:type:`PyObject\\ *`."
383+ " The C variable may also be declared as :c:type:`PyObject*`."
388384msgstr ""
389- "要求 Python 对象是一个 Unicode 对象,没有尝试任何的转换。如果不是一个 Unicode 对象会引发 :exc:`TypeError` "
390- "异常。C 变量也可能声明为 :c:type:`PyObject\\ *` 类型。"
391385
392386#: ../../c-api/arg.rst:192
393387msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]"
@@ -416,17 +410,13 @@ msgstr "``s`` 的变式,它将编码后的 Unicode 字符存入字符缓冲区
416410#: ../../c-api/arg.rst:198
417411msgid ""
418412"This format requires two arguments. The first is only used as input, and "
419- "must be a :c:type:`const char\\ *` which points to the name of an encoding as"
420- " a NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is"
421- " used. An exception is raised if the named encoding is not known to Python."
422- " The second argument must be a :c:type:`char\\ *\\ *`; the value of the "
423- "pointer it references will be set to a buffer with the contents of the "
424- "argument text. The text will be encoded in the encoding specified by the "
425- "first argument."
426- msgstr ""
427- "此格式需要两个参数。 第一个仅用作输入,并且必须是 :c:type:`const char\\ *`,该名称将编码的名称指向 NUL "
428- "终止字符串或\" NULL\" ,在这种情况下,使用 ``'utf-8'`` 编码。如果 Python 不知道命名编码,则引发异常。 第二个参数必须为 "
429- ":c:type:`char\\ *\\ *` 它引用的指针的值将设置为包含参数文本内容的缓冲区。文本将以第一个参数指定的编码进行编码。"
413+ "must be a :c:type:`const char*` which points to the name of an encoding as a"
414+ " NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is "
415+ "used. An exception is raised if the named encoding is not known to Python. "
416+ "The second argument must be a :c:type:`char**`; the value of the pointer it "
417+ "references will be set to a buffer with the contents of the argument text. "
418+ "The text will be encoded in the encoding specified by the first argument."
419+ msgstr ""
430420
431421#: ../../c-api/arg.rst:206
432422msgid ""
@@ -471,19 +461,15 @@ msgstr "``s#`` 的变式,它将已编码的 Unicode 字符存入字符缓冲
471461#: ../../c-api/arg.rst:221
472462msgid ""
473463"It requires three arguments. The first is only used as input, and must be a"
474- " :c:type:`const char\\ *` which points to the name of an encoding as a NUL-"
464+ " :c:type:`const char*` which points to the name of an encoding as a NUL-"
475465"terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. "
476466"An exception is raised if the named encoding is not known to Python. The "
477- "second argument must be a :c:type:`char\\ * \\ *`; the value of the pointer it "
467+ "second argument must be a :c:type:`char* *`; the value of the pointer it "
478468"references will be set to a buffer with the contents of the argument text. "
479469"The text will be encoded in the encoding specified by the first argument. "
480470"The third argument must be a pointer to an integer; the referenced integer "
481471"will be set to the number of bytes in the output buffer."
482472msgstr ""
483- "它需要三个参数。 第一个仅用作输入,并且必须为 :c:type:`const char\\ *`,该对象指向一个编码格式名称,形式为以 NUL "
484- "结束的字符串或 ``NULL``,在后一种情况下将使用 ``'utf-8'`` 编码格式。 如果编码格式名称无法被 Python 识别则会引发异常。 "
485- "第二个参数必须为 :c:type:`char\\ *\\ *`;它所引用的指针的值将被设为包含参数文本内容的缓冲区。 "
486- "文本将以第一个参数所指定的编码格式进行编码。 第三个参数必须是指向一个整数的指针;所引用的整数将被设为输出缓冲区中的字节数。"
487473
488474#: ../../c-api/arg.rst:231
489475msgid "There are two modes of operation:"
@@ -714,13 +700,10 @@ msgstr "``O!`` (object) [*typeobject*, PyObject \\*]"
714700msgid ""
715701"Store a Python object in a C object pointer. This is similar to ``O``, but "
716702"takes two C arguments: the first is the address of a Python type object, the"
717- " second is the address of the C variable (of type :c:type:`PyObject\\ *`) "
718- "into which the object pointer is stored. If the Python object does not have"
719- " the required type, :exc:`TypeError` is raised."
703+ " second is the address of the C variable (of type :c:type:`PyObject*`) into "
704+ "which the object pointer is stored. If the Python object does not have the "
705+ "required type, :exc:`TypeError` is raised."
720706msgstr ""
721- "将一个 Python 对象存入一个 C 指针。和 ``O`` 类似,但是需要两个 C 参数:第一个是 Python "
722- "类型对象的地址,第二个是存储对象指针的 C 变量( :c:type:`PyObject\\ *` 变量)的地址。如果 Python 对象类型不对,会抛出 "
723- ":exc:`TypeError` 异常。"
724707
725708#: ../../c-api/arg.rst:352 ../../c-api/arg.rst:657
726709msgid "``O&`` (object) [*converter*, *anything*]"
@@ -730,24 +713,19 @@ msgstr "``O&`` (object) [*converter*, *anything*]"
730713msgid ""
731714"Convert a Python object to a C variable through a *converter* function. "
732715"This takes two arguments: the first is a function, the second is the address"
733- " of a C variable (of arbitrary type), converted to :c:type:`void \\ *`. The "
716+ " of a C variable (of arbitrary type), converted to :c:type:`void *`. The "
734717"*converter* function in turn is called as follows::"
735718msgstr ""
736- "通过一个 *converter* 函数将一个 Python 对象转换成一个 C 变量。这需要两个参数:第一个是一个函数,第二个是一个 C "
737- "变量的地址(任意类型的),转化为 :c:type:`void \\ *` 类型。*converter* 函数像这样被调用:"
738719
739720#: ../../c-api/arg.rst:339
740721msgid ""
741722"where *object* is the Python object to be converted and *address* is the "
742- ":c:type:`void\\ *` argument that was passed to the :c:func:`PyArg_Parse\\ *` "
723+ ":c:type:`void*` argument that was passed to the :c:func:`PyArg_Parse\\ *` "
743724"function. The returned *status* should be ``1`` for a successful conversion "
744725"and ``0`` if the conversion has failed. When the conversion fails, the "
745726"*converter* function should raise an exception and leave the content of "
746727"*address* unmodified."
747728msgstr ""
748- "*object*是待转化的Python对象并且 *address* 是传入 :c:func:`PyArg_Parse\\ *` 函数的 "
749- ":c:type:`void\\ *` 类型参数。返回的 *status* "
750- "是1代表转换成功,0代表转换失败。当转换失败,*converter*函数会引发一个异常并且不会修改 *address* 的内容。"
751729
752730#: ../../c-api/arg.rst:345
753731msgid ""
@@ -970,20 +948,13 @@ msgid ""
970948"should be passed as *args*; it must actually be a tuple. The length of the "
971949"tuple must be at least *min* and no more than *max*; *min* and *max* may be "
972950"equal. Additional arguments must be passed to the function, each of which "
973- "should be a pointer to a :c:type:`PyObject\\ *` variable; these will be "
974- "filled in with the values from *args*; they will contain borrowed "
975- "references. The variables which correspond to optional parameters not given"
976- " by *args* will not be filled in; these should be initialized by the caller."
977- " This function returns true on success and false if *args* is not a tuple or"
978- " contains the wrong number of elements; an exception will be set if there "
979- "was a failure."
980- msgstr ""
981- "一个不使用格式化字符串指定参数类型的简单形式的参数检索。使用这种方法来检索参数的函数应该在函数或者方法表中声明 "
982- ":const:`METH_VARARGS`。包含实际参数的元组应该以 *args* 形式被传入;它必须是一个实际的元组。元组的长度必须至少是 *min*"
983- " 并且不超过 *max*; *min* 和 *max* 可能相同。额外的参数必须传递给函数,每一个参数必须是一个指向 "
984- ":c:type:`PyObject\\ *` 类型变量的指针;它们将被赋值为 *args* 的值;它们将包含借来的引用。不在 *args* "
985- "里面的可选参数不会被赋值;由调用者完成初始化。函数成功则返回 true 并且如果 *args* 不是元组或者包含错误数量的元素则返回 "
986- "false;如果失败了会引发一个异常。"
951+ "should be a pointer to a :c:type:`PyObject*` variable; these will be filled "
952+ "in with the values from *args*; they will contain borrowed references. The "
953+ "variables which correspond to optional parameters not given by *args* will "
954+ "not be filled in; these should be initialized by the caller. This function "
955+ "returns true on success and false if *args* is not a tuple or contains the "
956+ "wrong number of elements; an exception will be set if there was a failure."
957+ msgstr ""
987958
988959#: ../../c-api/arg.rst:493
989960msgid ""
@@ -1277,11 +1248,9 @@ msgstr "和 ``O`` 相同,然而它并不增加对象的引用计数。当通
12771248msgid ""
12781249"Convert *anything* to a Python object through a *converter* function. The "
12791250"function is called with *anything* (which should be compatible with "
1280- ":c:type:`void \\ *`) as its argument and should return a \" new\" Python "
1281- "object, or ``NULL`` if an error occurred."
1251+ ":c:type:`void*`) as its argument and should return a \" new\" Python object, "
1252+ "or ``NULL`` if an error occurred."
12821253msgstr ""
1283- "通过 *converter* 函数将 *anything* 转换为 Python 对象。 该函数以 *anything* (应与 "
1284- ":c:type:`void \\ *` 兼容)作为其参数,应返回 \" new\" Python 对象,如果发生错误,则应返回 ``NULL``。"
12851254
12861255#: ../../c-api/arg.rst:660
12871256msgid ""
0 commit comments