8000 sync with cpython 02394400 · python/python-docs-zh-tw@3179e77 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3179e77

Browse files
sync with cpython 02394400
1 parent 0030559 commit 3179e77

File tree

5 files changed

+424
-418
lines changed

5 files changed

+424
-418
lines changed

c-api/conversion.po

Lines changed: 24 additions & 22 deletions
E30A
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: Python 3.10\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2022-10-06 00:23+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,42 +55,44 @@ 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."
5961
msgstr ""
6062

61-
#: ../../c-api/conversion.rst:33
63+
#: ../../c-api/conversion.rst:34
6264
msgid ""
6365
"The return value (*rv*) for these functions should be interpreted as follows:"
6466
msgstr "當回傳值 (*rv*) 給這些函數應該被編譯如下:"
6567

66-
#: ../../c-api/conversion.rst:35
68+
#: ../../c-api/conversion.rst:36
6769
msgid ""
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]``)."
7173
msgstr ""
7274

73-
#: ../../c-api/conversion.rst:39
75+
#: ../../c-api/conversion.rst:40
7476
msgid ""
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."
7880
msgstr ""
7981

80-
#: ../../c-api/conversion.rst:43
82+
#: ../../c-api/conversion.rst:44
8183
msgid ""
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."
8587
msgstr ""
8688

87-
#: ../../c-api/conversion.rst:48
89+
#: ../../c-api/conversion.rst:49
8890
msgid ""
8991
"The following functions provide locale-independent string to number "
9092
"conversions."
9193
msgstr ""
9294

93-
#: ../../c-api/conversion.rst:52
95+
#: ../../c-api/conversion.rst:53
9496
msgid ""
9597
"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 "
@@ -99,14 +101,14 @@ msgid ""
99101
"current locale."
100102
msgstr ""
101103

102-
#: ../../c-api/conversion.rst:58
104+
#: ../../c-api/conversion.rst:59
103105
msgid ""
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."
107109
msgstr ""
108110

109-
#: ../../c-api/conversion.rst:62
111+
#: ../../c-api/conversion.rst:63
110112
msgid ""
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``."
116118
msgstr ""
117119

118-
#: ../../c-api/conversion.rst:69
120+
#: ../../c-api/conversion.rst:70
119121
msgid ""
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."
127129
msgstr ""
128130

129-
#: ../../c-api/conversion.rst:77
131+
#: ../../c-api/conversion.rst:78
130132
msgid ""
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``."
133135
msgstr ""
134136

135-
#: ../../c-api/conversion.rst:86
137+
#: ../../c-api/conversion.rst:87
136138
msgid ""
137139
"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, "
138140
"*precision*, and *flags*."
139141
msgstr ""
140142

141-
#: ../../c-api/conversion.rst:89
143+
#: ../../c-api/conversion.rst:90
142144
msgid ""
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."
146148
msgstr ""
147149

148-
#: ../../c-api/conversion.rst:94
150+
#: ../../c-api/conversion.rst:95
149151
msgid ""
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:"
152154
msgstr ""
153155

154-
#: ../../c-api/conversion.rst:97
156+
#: ../../c-api/conversion.rst:98
155157
msgid ""
156158
"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
157159
"character, even if *val* is non-negative."
158160
msgstr ""
159161

160-
#: ../../c-api/conversion.rst:100
162+
#: ../../c-api/conversion.rst:101
161163
msgid ""
162164
"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look "
163165
"like an integer."
164166
msgstr ""
165167

166-
#: ../../c-api/conversion.rst:103
168+
#: ../../c-api/conversion.rst:104
167169
msgid ""
168170
"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the "
169171
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
170172
msgstr ""
171173

172-
#: ../../c-api/conversion.rst:107
174+
#: ../../c-api/conversion.rst:108
173175
msgid ""
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."
178180
msgstr ""
179181

180-
#: ../../c-api/conversion.rst:111
182+
#: ../../c-api/conversion.rst:112
181183
msgid ""
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`."
185187
msgstr ""
186188

187-
#: ../../c-api/conversion.rst:120
189+
#: ../../c-api/conversion.rst:121
188190
msgid ""
189191
"Case insensitive comparison of strings. The function works almost "
190192
"identically to :c:func:`strcmp` except that it ignores the case."
191193
msgstr ""
192194

193-
#: ../../c-api/conversion.rst:126
195+
#: ../../c-api/conversion.rst:127
194196
msgid ""
195197
"Case insensitive comparison of strings. The function works almost "
196198
"identically to :c:func:`strncmp` except that it ignores the case."

library/csv.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.10\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2021-10-26 16:47+0000\n"
10+
"POT-Creation-Date: 2022-10-08 00:21+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:42+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -429,7 +429,7 @@ msgstr ""
429429

430430
#: ../../library/csv.rst:415
431431
msgid ""
432-
"When :const:`True`, whitespace immediately following the *delimiter* is "
432+
"When :const:`True`, spaces immediately following the *delimiter* are "
433433
"ignored. The default is :const:`False`."
434434
msgstr ""
435435

0 commit comments

Comments
 (0)
0