|
8 | 8 | msgstr ""
|
9 | 9 | "Project-Id-Version: Python 3.11\n"
|
10 | 10 | "Report-Msgid-Bugs-To: \n"
|
11 |
| -"POT-Creation-Date: 2022-10-06 00:23+0000\n" |
| 11 | +"POT-Creation-Date: 2023-01-25 00:17+0000\n" |
12 | 12 | "PO-Revision-Date: 2018-05-23 14:06+0000\n"
|
13 | 13 | "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
|
14 | 14 | "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
|
@@ -118,210 +118,217 @@ msgid ""
|
118 | 118 | "are no digits, :exc:`ValueError` will be raised."
|
119 | 119 | msgstr ""
|
120 | 120 |
|
121 |
| -#: ../../c-api/long.rst:99 |
| 121 | +#: ../../c-api/long.rst:96 |
| 122 | +msgid "" |
| 123 | +"Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` to convert a :" |
| 124 | +"c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can " |
| 125 | +"call those from C using :c:func:`PyObject_CallMethod`." |
| 126 | +msgstr "" |
| 127 | + |
| 128 | +#: ../../c-api/long.rst:103 |
122 | 129 | msgid ""
|
123 | 130 | "Convert a sequence of Unicode digits in the string *u* to a Python integer "
|
124 | 131 | "value."
|
125 | 132 | msgstr ""
|
126 | 133 |
|
127 |
| -#: ../../c-api/long.rst:107 |
| 134 | +#: ../../c-api/long.rst:111 |
128 | 135 | msgid ""
|
129 | 136 | "Create a Python integer from the pointer *p*. The pointer value can be "
|
130 | 137 | "retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`."
|
131 | 138 | msgstr ""
|
132 | 139 |
|
133 |
| -#: ../../c-api/long.rst:118 ../../c-api/long.rst:136 |
| 140 | +#: ../../c-api/long.rst:122 ../../c-api/long.rst:140 |
134 | 141 | msgid ""
|
135 | 142 | "Return a C :c:expr:`long` representation of *obj*. If *obj* is not an "
|
136 | 143 | "instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method "
|
137 | 144 | "(if present) to convert it to a :c:type:`PyLongObject`."
|
138 | 145 | msgstr ""
|
139 | 146 |
|
140 |
| -#: ../../c-api/long.rst:122 |
| 147 | +#: ../../c-api/long.rst:126 |
141 | 148 | msgid ""
|
142 | 149 | "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:"
|
143 | 150 | "expr:`long`."
|
144 | 151 | msgstr ""
|
145 | 152 |
|
146 |
| -#: ../../c-api/long.rst:125 ../../c-api/long.rst:145 ../../c-api/long.rst:166 |
147 |
| -#: ../../c-api/long.rst:186 ../../c-api/long.rst:209 |
| 153 | +#: ../../c-api/long.rst:129 ../../c-api/long.rst:149 ../../c-api/long.rst:170 |
| 154 | +#: ../../c-api/long.rst:190 ../../c-api/long.rst:213 |
148 | 155 | msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
|
149 | 156 | msgstr ""
|
150 | 157 |
|
151 |
| -#: ../../c-api/long.rst:127 ../../c-api/long.rst:147 ../../c-api/long.rst:168 |
152 |
| -#: ../../c-api/long.rst:190 ../../c-api/long.rst:274 ../../c-api/long.rst:294 |
| 158 | +#: ../../c-api/long.rst:131 ../../c-api/long.rst:151 ../../c-api/long.rst:172 |
| 159 | +#: ../../c-api/long.rst:194 ../../c-api/long.rst:278 ../../c-api/long.rst:298 |
153 | 160 | msgid "Use :meth:`__index__` if available."
|
154 | 161 | msgstr ""
|
155 | 162 |
|
156 |
| -#: ../../c-api/long.rst:130 ../../c-api/long.rst:150 ../../c-api/long.rst:171 |
157 |
| -#: ../../c-api/long.rst:193 ../../c-api/long.rst:277 ../../c-api/long.rst:297 |
| 163 | +#: ../../c-api/long.rst:134 ../../c-api/long.rst:154 ../../c-api/long.rst:175 |
| 164 | +#: ../../c-api/long.rst:197 ../../c-api/long.rst:281 ../../c-api/long.rst:301 |
158 | 165 | msgid "This function will no longer use :meth:`__int__`."
|
159 | 166 | msgstr ""
|
160 | 167 |
|
161 |
| -#: ../../c-api/long.rst:140 |
| 168 | +#: ../../c-api/long.rst:144 |
162 | 169 | msgid ""
|
163 | 170 | "If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:"
|
164 | 171 | "`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return "
|
165 | 172 | "``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception "
|
166 | 173 | "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
|
167 | 174 | msgstr ""
|
168 | 175 |
|
169 |
| -#: ../../c-api/long.rst:159 ../../c-api/long.rst:177 |
| 176 | +#: ../../c-api/long.rst:163 ../../c-api/long.rst:181 |
170 | 177 | msgid ""
|
171 | 178 | "Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an "
|
172 | 179 | "instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method "
|
173 | 180 | "(if present) to convert it to a :c:type:`PyLongObject`."
|
174 | 181 | msgstr ""
|
175 | 182 |
|
176 |
| -#: ../../c-api/long.rst:163 |
| 183 | +#: ../../c-api/long.rst:167 |
177 | 184 | msgid ""
|
178 | 185 | "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:"
|
179 | 186 | "expr:`long long`."
|
180 | 187 | msgstr ""
|
181 | 188 |
|
182 |
| -#: ../../c-api/long.rst:181 |
| 189 | +#: ../../c-api/long.rst:185 |
183 | 190 | msgid ""
|
184 | 191 | "If the value of *obj* is greater than :const:`LLONG_MAX` or less than :const:"
|
185 | 192 | "`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return "
|
186 | 193 | "``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception "
|
187 | 194 | "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
|
188 | 195 | msgstr ""
|
189 | 196 |
|
190 |
| -#: ../../c-api/long.rst:203 |
| 197 | +#: ../../c-api/long.rst:207 |
191 | 198 | msgid ""
|
192 | 199 | "Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must "
|
193 | 200 | "be an instance of :c:type:`PyLongObject`."
|
194 | 201 | msgstr ""
|
195 | 202 |
|
196 |
| -#: ../../c-api/long.rst:206 |
| 203 | +#: ../../c-api/long.rst:210 |
197 | 204 | msgid ""
|
198 | 205 | "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
199 | 206 | "type:`Py_ssize_t`."
|
200 | 207 | msgstr ""
|
201 | 208 |
|
202 |
| -#: ../../c-api/long.rst:218 |
| 209 | +#: ../../c-api/long.rst:222 |
203 | 210 | msgid ""
|
204 | 211 | "Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* "
|
205 | 212 | "must be an instance of :c:type:`PyLongObject`."
|
206 | 213 | msgstr ""
|
207 | 214 |
|
208 |
| -#: ../../c-api/long.rst:221 |
| 215 | +#: ../../c-api/long.rst:225 |
209 | 216 | msgid ""
|
210 | 217 | "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
211 | 218 | "expr:`unsigned long`."
|
212 | 219 | msgstr ""
|
213 | 220 |
|
214 |
| -#: ../../c-api/long.rst:224 |
| 221 | +#: ../../c-api/long.rst:228 |
215 | 222 | msgid ""
|
216 | 223 | "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
|
217 | 224 | "disambiguate."
|
218 | 225 | msgstr ""
|
219 | 226 |
|
220 |
| -#: ../../c-api/long.rst:234 |
| 227 | +#: ../../c-api/long.rst:238 |
221 | 228 | msgid ""
|
222 | 229 | "Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an "
|
223 | 230 | "instance of :c:type:`PyLongObject`."
|
224 | 231 | msgstr ""
|
225 | 232 |
|
226 |
| -#: ../../c-api/long.rst:237 |
| 233 | +#: ../../c-api/long.rst:241 |
227 | 234 | msgid ""
|
228 | 235 | "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
229 | 236 | "type:`size_t`."
|
230 | 237 | msgstr ""
|
231 | 238 |
|
232 |
| -#: ../../c-api/long.rst:240 |
| 239 | +#: ../../c-api/long.rst:244 |
233 | 240 | msgid ""
|
234 | 241 | "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to "
|
235 | 242 | "disambiguate."
|
236 | 243 | msgstr ""
|
237 | 244 |
|
238 |
| -#: ../../c-api/long.rst:249 |
| 245 | +#: ../../c-api/long.rst:253 |
239 | 246 | msgid ""
|
240 | 247 | "Return a C :c:expr:`unsigned long long` representation of *pylong*. "
|
241 | 248 | "*pylong* must be an instance of :c:type:`PyLongObject`."
|
242 | 249 | msgstr ""
|
243 | 250 |
|
244 |
| -#: ../../c-api/long.rst:252 |
| 251 | +#: ../../c-api/long.rst:256 |
245 | 252 | msgid ""
|
246 | 253 | "Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :"
|
247 | 254 | "c:expr:`unsigned long long`."
|
248 | 255 | msgstr ""
|
249 | 256 |
|
250 |
| -#: ../../c-api/long.rst:255 |
| 257 | +#: ../../c-api/long.rst:259 |
251 | 258 | msgid ""
|
252 | 259 | "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
|
253 | 260 | "disambiguate."
|
254 | 261 | msgstr ""
|
255 | 262 |
|
256 |
| -#: ../../c-api/long.rst:258 |
| 263 | +#: ../../c-api/long.rst:262 |
257 | 264 | msgid ""
|
258 | 265 | "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`."
|
259 | 266 | msgstr ""
|
260 | 267 |
|
261 |
| -#: ../../c-api/long.rst:264 |
| 268 | +#: ../../c-api/long.rst:268 |
262 | 269 | msgid ""
|
263 | 270 | "Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not "
|
264 | 271 | "an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` "
|
265 | 272 | "method (if present) to convert it to a :c:type:`PyLongObject`."
|
266 | 273 | msgstr ""
|
267 | 274 |
|
268 |
| -#: ../../c-api/long.rst:268 |
| 275 | +#: ../../c-api/long.rst:272 |
269 | 276 | msgid ""
|
270 | 277 | "If the value of *obj* is out of range for an :c:expr:`unsigned long`, return "
|
271 | 278 | "the reduction of that value modulo ``ULONG_MAX + 1``."
|
272 | 279 | msgstr ""
|
273 | 280 |
|
274 |
| -#: ../../c-api/long.rst:271 |
| 281 | +#: ../../c-api/long.rst:275 |
275 | 282 | msgid ""
|
276 | 283 | "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
|
277 | 284 | "disambiguate."
|
278 | 285 | msgstr ""
|
279 | 286 |
|
280 |
| -#: ../../c-api/long.rst:283 |
| 287 | +#: ../../c-api/long.rst:287 |
281 | 288 | msgid ""
|
282 | 289 | "Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* "
|
283 | 290 | "is not an instance of :c:type:`PyLongObject`, first call its :meth:"
|
284 | 291 | "`__index__` method (if present) to convert it to a :c:type:`PyLongObject`."
|
285 | 292 | msgstr ""
|
286 | 293 |
|
287 |
| -#: ../../c-api/long.rst:288 |
| 294 | +#: ../../c-api/long.rst:292 |
288 | 295 | msgid ""
|
289 | 296 | "If the value of *obj* is out of range for an :c:expr:`unsigned long long`, "
|
290 | 297 | "return the reduction of that value modulo ``ULLONG_MAX + 1``."
|
291 | 298 | msgstr ""
|
292 | 299 |
|
293 |
| -#: ../../c-api/long.rst:291 |
| 300 | +#: ../../c-api/long.rst:295 |
294 | 301 | msgid ""
|
295 | 302 | "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` "
|
296 | 303 | "to disambiguate."
|
297 | 304 | msgstr ""
|
298 | 305 |
|
299 |
| -#: ../../c-api/long.rst:303 |
| 306 | +#: ../../c-api/long.rst:307 |
300 | 307 | msgid ""
|
301 | 308 | "Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an "
|
302 | 309 | "instance of :c:type:`PyLongObject`."
|
303 | 310 | msgstr ""
|
304 | 311 |
|
305 |
| -#: ../../c-api/long.rst:306 |
| 312 | +#: ../../c-api/long.rst:310 |
306 | 313 | msgid ""
|
307 | 314 | "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
308 | 315 | "expr:`double`."
|
309 | 316 | msgstr ""
|
310 | 317 |
|
311 |
| -#: ../../c-api/long.rst:309 |
| 318 | +#: ../../c-api/long.rst:313 |
312 | 319 | msgid ""
|
313 | 320 | "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
|
314 | 321 | msgstr ""
|
315 | 322 |
|
316 |
| -#: ../../c-api/long.rst:314 |
| 323 | +#: ../../c-api/long.rst:318 |
317 | 324 | msgid ""
|
318 | 325 | "Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* "
|
319 | 326 | "cannot be converted, an :exc:`OverflowError` will be raised. This is only "
|
320 | 327 | "assured to produce a usable :c:expr:`void` pointer for values created with :"
|
321 | 328 | "c:func:`PyLong_FromVoidPtr`."
|
322 | 329 | msgstr ""
|
323 | 330 |
|
324 |
| -#: ../../c-api/long.rst:319 |
| 331 | +#: ../../c-api/long.rst:323 |
325 | 332 | msgid ""
|
326 | 333 | "Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
|
327 | 334 | msgstr ""
|
0 commit comments