9
9
msgstr ""
10
10
"Project-Id-Version : Python 3.10\n "
11
11
"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 "
13
13
"PO-Revision-Date : 2017-09-22 18:26+0000\n "
14
14
"Last-Translator : Leon H.\n "
15
15
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -55,58 +55,60 @@ msgid ""
55
55
"The wrappers ensure that ``str[size-1]`` is always ``'\\ 0'`` upon return. "
56
56
"They never write more than *size* bytes (including the trailing ``'\\ 0'``) "
57
57
"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."
59
61
msgstr ""
60
62
61
- #: ../../c-api/conversion.rst:33
63
+ #: ../../c-api/conversion.rst:34
62
64
msgid ""
63
65
"The return value (*rv*) for these functions should be interpreted as follows:"
64
66
msgstr "當回傳值 (*rv*) 給這些函數應該被編譯如下:"
65
67
66
- #: ../../c-api/conversion.rst:35
68
+ #: ../../c-api/conversion.rst:36
67
69
msgid ""
68
70
"When ``0 <= rv < size``, the output conversion was successful and *rv* "
69
71
"characters were written to *str* (excluding the trailing ``'\\ 0'`` byte at "
70
72
"``str[rv]``)."
71
73
msgstr ""
72
74
73
- #: ../../c-api/conversion.rst:39
75
+ #: ../../c-api/conversion.rst:40
74
76
msgid ""
75
77
"When ``rv >= size``, the output conversion was truncated and a buffer with "
76
78
"``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is "
77
79
"``'\\ 0'`` in this case."
78
80
msgstr ""
79
81
80
- #: ../../c-api/conversion.rst:43
82
+ #: ../../c-api/conversion.rst:44
81
83
msgid ""
82
84
"When ``rv < 0``, \" something bad happened.\" ``str[size-1]`` is ``'\\ 0'`` in "
83
85
"this case too, but the rest of *str* is undefined. The exact cause of the "
84
86
"error depends on the underlying platform."
85
87
msgstr ""
86
88
87
- #: ../../c-api/conversion.rst:48
89
+ #: ../../c-api/conversion.rst:49
88
90
msgid ""
89
91
"The following functions provide locale-independent string to number "
90
92
"conversions."
91
93
msgstr ""
92
94
93
- #: ../../c-api/conversion.rst:52
95
+ #: ../../c-api/conversion.rst:53
94
96
msgid ""
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 "
96
98
"failure. The set of accepted strings corresponds to the set of strings "
97
99
"accepted by Python's :func:`float` constructor, except that ``s`` must not "
98
100
"have leading or trailing whitespace. The conversion is independent of the "
99
101
"current locale."
100
102
msgstr ""
101
103
102
- #: ../../c-api/conversion.rst:58
104
+ #: ../../c-api/conversion.rst:59
103
105
msgid ""
104
106
"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:"
105
107
"`ValueError` and return ``-1.0`` if the string is not a valid representation "
106
108
"of a floating-point number."
107
109
msgstr ""
108
110
109
- #: ../../c-api/conversion.rst:62
111
+ #: ../../c-api/conversion.rst:63
110
112
msgid ""
111
113
"If endptr is not ``NULL``, convert as much of the string as possible and set "
112
114
"``*endptr`` to point to the first unconverted character. If no initial "
@@ -115,7 +117,7 @@ msgid ""
115
117
"ValueError, and return ``-1.0``."
116
118
msgstr ""
117
119
118
- #: ../../c-api/conversion.rst:69
120
+ #: ../../c-api/conversion.rst:70
119
121
msgid ""
120
122
"If ``s`` represents a value that is too large to store in a float (for "
121
123
"example, ``\" 1e500\" `` is such a string on many platforms) then if "
@@ -126,71 +128,71 @@ msgid ""
126
128
"the first character after the converted value."
127
129
msgstr ""
128
130
129
- #: ../../c-api/conversion.rst:77
131
+ #: ../../c-api/conversion.rst:78
130
132
msgid ""
131
133
"If any other error occurs during the conversion (for example an out-of-"
132
134
"memory error), set the appropriate Python exception and return ``-1.0``."
133
135
msgstr ""
134
136
135
- #: ../../c-api/conversion.rst:86
137
+ #: ../../c-api/conversion.rst:87
136
138
msgid ""
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*, "
138
140
"*precision*, and *flags*."
139
141
msgstr ""
140
142
141
- #: ../../c-api/conversion.rst:89
143
+ #: ../../c-api/conversion.rst:90
142
144
msgid ""
143
145
"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
144
146
"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
145
147
"ignored. The ``'r'`` format code specifies the standard :func:`repr` format."
146
148
msgstr ""
147
149
148
- #: ../../c-api/conversion.rst:94
150
+ #: ../../c-api/conversion.rst:95
149
151
msgid ""
150
152
"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, "
151
153
"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:"
152
154
msgstr ""
153
155
154
- #: ../../c-api/conversion.rst:97
156
+ #: ../../c-api/conversion.rst:98
155
157
msgid ""
156
158
"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
157
159
"character, even if *val* is non-negative."
158
160
msgstr ""
159
161
160
- #: ../../c-api/conversion.rst:100
162
+ #: ../../c-api/conversion.rst:101
161
163
msgid ""
162
164
"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look "
163
165
"like an integer."
164
166
msgstr ""
165
167
166
- #: ../../c-api/conversion.rst:103
168
+ #: ../../c-api/conversion.rst:104
167
169
msgid ""
168
170
"``Py_DTSF_ALT`` means to apply \" alternate\" formatting rules. See the "
169
171
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
170
172
msgstr ""
171
173
172
- #: ../../c-api/conversion.rst:107
174
+ #: ../../c-api/conversion.rst:108
173
175
msgid ""
174
176
"If *ptype* is non-``NULL``, then the value it points to will be set to one "
175
177
"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying "
176
178
"that *val* is a finite number, an infinite number, or not a number, "
177
179
"respectively."
178
180
msgstr ""
179
181
180
- #: ../../c-api/conversion.rst:111
182
+ #: ../../c-api/conversion.rst:112
181
183
msgid ""
182
184
"The return value is a pointer to *buffer* with the converted string or "
183
185
"``NULL`` if the conversion failed. The caller is responsible for freeing the "
184
186
"returned string by calling :c:func:`PyMem_Free`."
185
187
msgstr ""
186
188
187
- #: ../../c-api/conversion.rst:120
189
+ #: ../../c-api/conversion.rst:121
188
190
msgid ""
189
191
"Case insensitive comparison of strings. The function works almost "
190
192
"identically to :c:func:`strcmp` except that it ignores the case."
191
193
msgstr ""
192
194
193
- #: ../../c-api/conversion.rst:126
195
+ #: ../../c-api/conversion.rst:127
194
196
msgid ""
195
197
"Case insensitive comparison of strings. The function works almost "
196
198
"identically to :c:func:`strncmp` except that it ignores the case."
0 commit comments