@@ -47,7 +47,7 @@ msgid ""
4747"*format* and the variable argument list *va*. Unix man page "
4848":manpage:`vsnprintf(2)`."
4949msgstr ""
50- "根据格式字符串 *format* 和 变量参数列表 *va*, 不能输出超过 *size* 字节到 *str*。请参见Unix手册页 "
50+ "根据格式字符串 *format* 和 变量参数列表 *va* , 不能输出超过 *size* 字节到 *str* 。请参见Unix手册页 "
5151":manpage:`vsnprintf(2)` 。"
5252
5353#: ../../c-api/conversion.rst:23
@@ -57,8 +57,8 @@ msgid ""
5757"is to guarantee consistent behavior in corner cases, which the Standard C "
5858"functions do not."
5959msgstr ""
60- ":c:func:`PyOS_snprintf` 和 :c:func:`PyOS_vsnprintf` 包装 C 标准库函数 "
61- ":c:func:`snprintf` 和 :c:func:`vsnprintf`。它们的目的是保证在极端情况下的一致行为,而标准C的函数则不然。"
60+ " :c:func:`PyOS_snprintf` 和 :c:func:`PyOS_vsnprintf` 包装C标准库函数 "
61+ ":c:func:`snprintf` 和 :c:func:`vsnprintf` 。它们的目的是保证在极端情况下的一致行为,而标准C的函数则不然。"
6262
6363#: ../../c-api/conversion.rst:28
6464msgid ""
@@ -67,40 +67,40 @@ msgid ""
6767"into str. Both functions require that ``str != NULL``, ``size > 0`` and "
6868"``format != NULL``."
6969msgstr ""
70- "包装器确保 *str*[*size*-1] 在返回时始终是 ``'\\ 0'``。它们从不写入超过 *size* 字节(包括结尾的 ``'\\ 0'`` "
71- ")到字符串。两函数都需要满足 ``str != NULL``, ``size > 0`` 和 ``format != NULL`` 。"
70+ "包装器确保 *str*[*size*-1] 在返回时始终是 ``'\\ 0'`` 。它们从不写入超过 *size* 字节(包括结尾的 ``'\\ 0'`` "
71+ ")到字符串。两函数都需要满足 ``str != NULL`` , ``size > 0`` 和 ``format != NULL`` 。"
7272
7373#: ../../c-api/conversion.rst:33
7474msgid ""
7575"If the platform doesn't have :c:func:`vsnprintf` and the buffer size needed "
7676"to avoid truncation exceeds *size* by more than 512 bytes, Python aborts "
7777"with a *Py_FatalError*."
7878msgstr ""
79- "如果平台没有 :c:func:`vsnprintf` 而且避免缓冲区大小超过 * size * 需要截断超过512字节时 ,Python 将以一个 "
79+ "如果平台没有 :c:func:`vsnprintf` 而且避免缓冲区大小超过 * size * 需要截断超过 512 字节时 ,Python 将以一个 "
8080"*Py_FatalError* 终止。"
8181
8282#: ../../c-api/conversion.rst:37
8383msgid ""
8484"The return value (*rv*) for these functions should be interpreted as "
8585"follows:"
86- msgstr "这些函数的返回值 ( *rv* )应按照以下规则被解释:"
86+ msgstr "这些函数的返回值( *rv* )应按照以下规则被解释:"
8787
8888#: ../../c-api/conversion.rst:39
8989msgid ""
9090"When ``0 <= rv < size``, the output conversion was successful and *rv* "
9191"characters were written to *str* (excluding the trailing ``'\\ 0'`` byte at "
9292"*str*[*rv*])."
9393msgstr ""
94- "当 ``0 <= rv < size`` , 输出转换成功 而且 *rv* 个字符被写入 *str* (不包含末尾 *str*[*rv*] 的 "
95- "``'\\ 0'`` 字节 )"
94+ "当 ``0 <= rv < size`` ,输出转换成功 而且 *rv* 个字符被写入 *str* (不包含末尾 *str*[*rv*] 的 "
95+ "``'\\ 0'`` 字节 )"
9696
9797#: ../../c-api/conversion.rst:43
9898msgid ""
9999"When ``rv >= size``, the output conversion was truncated and a buffer with "
100100"``rv + 1`` bytes would have been needed to succeed. *str*[*size*-1] is "
101101"``'\\ 0'`` in this case."
102102msgstr ""
103- "当 ``rv >= size`` , 输出转换被截断 并且成功需要一个带有 ``rv + 1`` 字节的缓冲区。 在这种情况下, "
103+ "当 ``rv >= size`` ,输出转换被截断并且成功需要一个带有 ``rv + 1`` 字节的缓冲区。在这种情况下, "
104104"*str*[*size*-1] 的值是 ``'\\ 0'`` 。"
105105
106106#: ../../c-api/conversion.rst:47
@@ -109,8 +109,8 @@ msgid ""
109109" this case too, but the rest of *str* is undefined. The exact cause of the "
110110"error depends on the underlying platform."
111111msgstr ""
112- "当 ``rv < 0`` ,会发生一些不好的事情。 在这种情况下,*str*[*size*-1] 的值也是 ``'\\ 0'`` , 但是 *str* "
113- "的其余部分未被定义。 错误的确切原因取决于底层平台。"
112+ "当 ``rv < 0`` ,会发生一些不好的事情。 在这种情况下, *str*[*size*-1] 的值也是 ``'\\ 0'`` , 但是 *str* "
113+ "的其余部分未被定义。错误的确切原因取决于底层平台。"
114114
115115#: ../../c-api/conversion.rst:51
116116msgid ""
@@ -126,8 +126,8 @@ msgid ""
126126"have leading or trailing whitespace. The conversion is independent of the "
127127"current locale."
128128msgstr ""
129- "将字符串 ``s`` 转换为 :c:type:`double` 类型, 失败时引发Python异常。 接受的字符串的集合对应于被 Python 的 "
130- ":func:`float` 构造函数接受的字符串的集合, 除了 ``s`` 必须没有前导或尾随空格。 转换必须独立于当前的区域。"
129+ "将字符串 ``s`` 转换为 :c:type:`double` 类型,失败时引发Python异常。接受的字符串的集合对应于被 Python 的 "
130+ ":func:`float` 构造函数接受的字符串的集合,除了 ``s`` 必须没有前导或尾随空格。转换必须独立于当前的区域。"
131131
132132#: ../../c-api/conversion.rst:62
133133msgid ""
@@ -146,6 +146,9 @@ msgid ""
146146"number, set ``*endptr`` to point to the beginning of the string, raise "
147147"ValueError, and return ``-1.0``."
148148msgstr ""
149+ "如果 ``endptr`` 不是 ``NULL`` ,尽可能多的转换字符串并将 ``*endptr`` "
150+ "设置为指向第一个未转换的字符。如果字符串的初始段不是浮点数的有效的表达方式,将 ``* endptr`` 设置为指向字符串的开头,引发 "
151+ "ValueError 异常,并且返回 ``-1.0`` 。"
149152
150153#: ../../c-api/conversion.rst:73
151154msgid ""
0 commit comments