99msgstr ""
1010"Project-Id-Version : Python 3.10\n "
1111"Report-Msgid-Bugs-To : \n "
12- "POT-Creation-Date : 2021 -10-26 16:47 +0000\n "
12+ "POT-Creation-Date : 2022 -10-08 00:21 +0000\n "
1313"PO-Revision-Date : 2017-09-22 18:26+0000\n "
1414"Last-Translator : Leon H.\n "
1515"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -55,58 +55,60 @@ msgid ""
5555"The wrappers ensure that ``str[size-1]`` is always ``'\\ 0'`` upon return. "
5656"They never write more than *size* bytes (including the trailing ``'\\ 0'``) "
5757"into str. Both functions require that ``str != NULL``, ``size > 0``, "
58- "``format != NULL`` and ``size < INT_MAX``."
58+ "``format != NULL`` and ``size < INT_MAX``. Note that this means there is no "
59+ "equivalent to the C99 ``n = snprintf(NULL, 0, ...)`` which would determine "
60+ "the necessary buffer size."
5961msgstr ""
6062
61- #: ../../c-api/conversion.rst:33
63+ #: ../../c-api/conversion.rst:34
6264msgid ""
6365"The return value (*rv*) for these functions should be interpreted as follows:"
6466msgstr "當回傳值 (*rv*) 給這些函數應該被編譯如下:"
6567
66- #: ../../c-api/conversion.rst:35
68+ #: ../../c-api/conversion.rst:36
6769msgid ""
6870"When ``0 <= rv < size``, the output conversion was successful and *rv* "
6971"characters were written to *str* (excluding the trailing ``'\\ 0'`` byte at "
7072"``str[rv]``)."
7173msgstr ""
7274
73- #: ../../c-api/conversion.rst:39
75+ #: ../../c-api/conversion.rst:40
7476msgid ""
7577"When ``rv >= size``, the output conversion was truncated and a buffer with "
7678"``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is "
7779"``'\\ 0'`` in this case."
7880msgstr ""
7981
80- #: ../../c-api/conversion.rst:43
82+ #: ../../c-api/conversion.rst:44
8183msgid ""
8284"When ``rv < 0``, \" something bad happened.\" ``str[size-1]`` is ``'\\ 0'`` in "
8385"this case too, but the rest of *str* is undefined. The exact cause of the "
8486"error depends on the underlying platform."
8587msgstr ""
8688
87- #: ../../c-api/conversion.rst:48
89+ #: ../../c-api/conversion.rst:49
8890msgid ""
8991"The following functions provide locale-independent string to number "
9092"conversions."
9193msgstr ""
9294
93- #: ../../c-api/conversion.rst:52
95+ #: ../../c-api/conversion.rst:53
9496msgid ""
95- "Convert a string ``s`` to a :c:type :`double`, raising a Python exception on "
97+ "Convert a string ``s`` to a :c:expr :`double`, raising a Python exception on "
9698"failure. The set of accepted strings corresponds to the set of strings "
9799"accepted by Python's :func:`float` constructor, except that ``s`` must not "
98100"have leading or trailing whitespace. The conversion is independent of the "
99101"current locale."
100102msgstr ""
101103
102- #: ../../c-api/conversion.rst:58
104+ #: ../../c-api/conversion.rst:59
103105msgid ""
104106"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:"
105107"`ValueError` and return ``-1.0`` if the string is not a valid representation "
106108"of a floating-point number."
107109msgstr ""
108110
109- #: ../../c-api/conversion.rst:62
111+ #: ../../c-api/conversion.rst:63
110112msgid ""
111113"If endptr is not ``NULL``, convert as much of the string as possible and set "
112114"``*endptr`` to point to the first unconverted character. If no initial "
@@ -115,7 +117,7 @@ msgid ""
115117"ValueError, and return ``-1.0``."
116118msgstr ""
117119
118- #: ../../c-api/conversion.rst:69
120+ #: ../../c-api/conversion.rst:70
119121msgid ""
120122"If ``s`` represents a value that is too large to store in a float (for "
121123"example, ``\" 1e500\" `` is such a string on many platforms) then if "
@@ -126,71 +128,71 @@ msgid ""
126128"the first character after the converted value."
127129msgstr ""
128130
129- #: ../../c-api/conversion.rst:77
131+ #: ../../c-api/conversion.rst:78
130132msgid ""
131133"If any other error occurs during the conversion (for example an out-of-"
132134"memory error), set the appropriate Python exception and return ``-1.0``."
133135msgstr ""
134136
135- #: ../../c-api/conversion.rst:86
137+ #: ../../c-api/conversion.rst:87
136138msgid ""
137- "Convert a :c:type :`double` *val* to a string using supplied *format_code*, "
139+ "Convert a :c:expr :`double` *val* to a string using supplied *format_code*, "
138140"*precision*, and *flags*."
139141msgstr ""
140142
141- #: ../../c-api/conversion.rst:89
143+ #: ../../c-api/conversion.rst:90
142144msgid ""
143145"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
144146"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
145147"ignored. The ``'r'`` format code specifies the standard :func:`repr` format."
146148msgstr ""
147149
148- #: ../../c-api/conversion.rst:94
150+ #: ../../c-api/conversion.rst:95
149151msgid ""
150152"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, "
151153"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:"
152154msgstr ""
153155
154- #: ../../c-api/conversion.rst:97
156+ #: ../../c-api/conversion.rst:98
155157msgid ""
156158"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
157159"character, even if *val* is non-negative."
158160msgstr ""
159161
160- #: ../../c-api/conversion.rst:100
162+ #: ../../c-api/conversion.rst:101
161163msgid ""
162164"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look "
163165"like an integer."
164166msgstr ""
165167
166- #: ../../c-api/conversion.rst:103
168+ #: ../../c-api/conversion.rst:104
167169msgid ""
168170"``Py_DTSF_ALT`` means to apply \" alternate\" formatting rules. See the "
169171"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
170172msgstr ""
171173
172- #: ../../c-api/conversion.rst:107
174+ #: ../../c-api/conversion.rst:108
173175msgid ""
174176"If *ptype* is non-``NULL``, then the value it points to will be set to one "
175177"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying "
176178"that *val* is a finite number, an infinite number, or not a number, "
177179"respectively."
178180msgstr ""
179181
180- #: ../../c-api/conversion.rst:111
182+ #: ../../c-api/conversion.rst:112
181183msgid ""
182184"The return value is a pointer to *buffer* with the converted string or "
183185"``NULL`` if the conversion failed. The caller is responsible for freeing the "
184186"returned string by calling :c:func:`PyMem_Free`."
185187msgstr ""
186188
187- #: ../../c-api/conversion.rst:120
189+ #: ../../c-api/conversion.rst:121
188190msgid ""
189191"Case insensitive comparison of strings. The function works almost "
190192"identically to :c:func:`strcmp` except that it ignores the case."
191193msgstr ""
192194
193- #: ../../c-api/conversion.rst:126
195+ #: ../../c-api/conversion.rst:127
194196msgid ""
195197"Case insensitive comparison of strings. The function works almost "
196198"identically to :c:func:`strncmp` except that it ignores the case."
0 commit comments