Skip to content

Commit bcd7f45

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.11 (#409)
* sync with cpython 3ddf3972 * sync with cpython df399a35 * sync with cpython 1eb9b249 * sync with cpython f79cfb66 * sync with cpython 8132aefa * sync with cpython a08b65fa * sync with cpython b28f9190 * fix: resolve fuzzy entries * sync with cpython ae42c1d1 * sync with cpython 41e3ea13 * sync with cpython 82362221 * sync with cpython 5342f5e7 * sync with cpython 6258c3cd * sync with cpython 851e7444 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Wang <mattwang44@gmail.com>
1 parent c4bbe64 commit bcd7f45

29 files changed

+3472
-3340
lines changed

c-api/init.po

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-10-31 08:13+0000\n"
10+
"POT-Creation-Date: 2023-03-16 00:18+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:06+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -579,10 +579,10 @@ msgid ""
579579
"example, if the program name is ``'/usr/local/bin/python'``, the prefix is "
580580
"``'/usr/local'``. The returned string points into static storage; the caller "
581581
"should not modify its value. This corresponds to the :makevar:`prefix` "
582-
"variable in the top-level :file:`Makefile` and the ``--prefix`` argument to "
583-
"the :program:`configure` script at build time. The value is available to "
584-
"Python code as ``sys.prefix``. It is only useful on Unix. See also the next "
585-
"function."
582+
"variable in the top-level :file:`Makefile` and the :option:`--prefix` "
583+
"argument to the :program:`configure` script at build time. The value is "
584+
"available to Python code as ``sys.prefix``. It is only useful on Unix. See "
585+
"also the next function."
586586
msgstr ""
587587

588588
#: ../../c-api/init.rst:420

c-api/intro.po

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-10-15 20:43+0000\n"
10+
"POT-Creation-Date: 2023-03-16 00:18+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:06+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -117,11 +117,11 @@ msgstr ""
117117
msgid ""
118118
"The header files are typically installed with Python. On Unix, these are "
119119
"located in the directories :file:`{prefix}/include/pythonversion/` and :file:"
120-
"`{exec_prefix}/include/pythonversion/`, where :envvar:`prefix` and :envvar:"
121-
"`exec_prefix` are defined by the corresponding parameters to Python's :"
122-
"program:`configure` script and *version* is ``'%d.%d' % sys."
123-
"version_info[:2]``. On Windows, the headers are installed in :file:"
124-
"`{prefix}/include`, where :envvar:`prefix` is the installation directory "
120+
"`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--prefix>` "
121+
"and :option:`exec_prefix <--exec-prefix>` are defined by the corresponding "
122+
"parameters to Python's :program:`configure` script and *version* is ``'%d."
123+
"%d' % sys.version_info[:2]``. On Windows, the headers are installed in :"
124+
"file:`{prefix}/include`, where ``prefix`` is the installation directory "
125125
"specified to the installer."
126126
msgstr ""
127127

@@ -131,8 +131,8 @@ msgid ""
131131
"compiler's search path for includes. Do *not* place the parent directories "
132132
"on the search path and then use ``#include <pythonX.Y/Python.h>``; this will "
133133
"break on multi-platform builds since the platform independent headers under :"
134-
"envvar:`prefix` include the platform specific headers from :envvar:"
135-
"`exec_prefix`."
134+
"option:`prefix <--prefix>` include the platform specific headers from :"
135+
"option:`exec_prefix <--exec-prefix>`."
136136
msgstr ""
137137

138138
#: ../../c-api/intro.rst:95

c-api/object.po

+42-29
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-02-15 00:17+0000\n"
10+
"POT-Creation-Date: 2023-03-23 00:15+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:32+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -193,21 +193,34 @@ msgid ""
193193
"will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`."
194194
msgstr ""
195195

196-
#: ../../c-api/object.rst:186
196+
#: ../../c-api/object.rst:184
197+
msgid ""
198+
"Format *obj* using *format_spec*. This is equivalent to the Python "
199+
"expression ``format(obj, format_spec)``."
200+
msgstr ""
201+
202+
#: ../../c-api/object.rst:187
203+
msgid ""
204+
"*format_spec* may be ``NULL``. In this case the call is equivalent to "
205+
"``format(obj)``. Returns the formatted string on success, ``NULL`` on "
206+
"failure."
207+
msgstr ""
208+
209+
#: ../../c-api/object.rst:195
197210
msgid ""
198211
"Compute a string representation of object *o*. Returns the string "
199212
"representation on success, ``NULL`` on failure. This is the equivalent of "
200213
"the Python expression ``repr(o)``. Called by the :func:`repr` built-in "
201214
"function."
202215
msgstr ""
203216

204-
#: ../../c-api/object.rst:190 ../../c-api/object.rst:214
217+
#: ../../c-api/object.rst:199 ../../c-api/object.rst:223
205218
msgid ""
206219
"This function now includes a debug assertion to help ensure that it does not "
207220
"silently discard an active exception."
208221
msgstr ""
209222

210-
#: ../../c-api/object.rst:198
223+
#: ../../c-api/object.rst:207
211224
msgid ""
212225
"As :c:func:`PyObject_Repr`, compute a string representation of object *o*, "
213226
"but escape the non-ASCII characters in the string returned by :c:func:"
@@ -216,15 +229,15 @@ msgid ""
216229
"Called by the :func:`ascii` built-in function."
217230
msgstr ""
218231

219-
#: ../../c-api/object.rst:209
232+
#: ../../c-api/object.rst:218
220233
msgid ""
221234
"Compute a string representation of object *o*. Returns the string "
222235
"representation on success, ``NULL`` on failure. This is the equivalent of "
223236
"the Python expression ``str(o)``. Called by the :func:`str` built-in "
224237
"function and, therefore, by the :func:`print` function."
225238
msgstr ""
226239

227-
#: ../../c-api/object.rst:223
240+
#: ../../c-api/object.rst:232
228241
msgid ""
229242
"Compute a bytes representation of object *o*. ``NULL`` is returned on "
230243
"failure and a bytes object on success. This is equivalent to the Python "
@@ -233,95 +246,95 @@ msgid ""
233246
"bytes object."
234247
msgstr ""
235248

236-
#: ../../c-api/object.rst:232
249+
#: ../../c-api/object.rst:241
237250
msgid ""
238251
"Return ``1`` if the class *derived* is identical to or derived from the "
239252
"class *cls*, otherwise return ``0``. In case of an error, return ``-1``."
240253
msgstr ""
241254

242-
#: ../../c-api/object.rst:235 ../../c-api/object.rst:254
255+
#: ../../c-api/object.rst:244 ../../c-api/object.rst:263
243256
msgid ""
244257
"If *cls* is a tuple, the check will be done against every entry in *cls*. "
245258
"The result will be ``1`` when at least one of the checks returns ``1``, "
246259
"otherwise it will be ``0``."
247260
msgstr ""
248261

249-
#: ../../c-api/object.rst:239
262+
#: ../../c-api/object.rst:248
250263
msgid ""
251264
"If *cls* has a :meth:`~class.__subclasscheck__` method, it will be called to "
252265
"determine the subclass status as described in :pep:`3119`. Otherwise, "
253266
"*derived* is a subclass of *cls* if it is a direct or indirect subclass, i."
254267
"e. contained in ``cls.__mro__``."
255268
msgstr ""
256269

257-
#: ../../c-api/object.rst:244
270+
#: ../../c-api/object.rst:253
258271
msgid ""
259272
"Normally only class objects, i.e. instances of :class:`type` or a derived "
260273
"class, are considered classes. However, objects can override this by having "
261274
"a :attr:`__bases__` attribute (which must be a tuple of base classes)."
262275
msgstr ""
263276

264-
#: ../../c-api/object.rst:251
277+
#: ../../c-api/object.rst:260
265278
msgid ""
266279
"Return ``1`` if *inst* is an instance of the class *cls* or a subclass of "
267280
"*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception."
268281
msgstr ""
269282

270-
#: ../../c-api/object.rst:258
283+
#: ../../c-api/object.rst:267
271284
msgid ""
272285
"If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to "
273286
"determine the subclass status as described in :pep:`3119`. Otherwise, "
274287
"*inst* is an instance of *cls* if its class is a subclass of *cls*."
275288
msgstr ""
276289

277-
#: ../../c-api/object.rst:262
290+
#: ../../c-api/object.rst:271
278291
msgid ""
279292
"An instance *inst* can override what is considered its class by having a :"
280293
"attr:`__class__` attribute."
281294
msgstr ""
282295

283-
#: ../../c-api/object.rst:265
296+
#: ../../c-api/object.rst:274
284297
msgid ""
285298
"An object *cls* can override if it is considered a class, and what its base "
286299
"classes are, by having a :attr:`__bases__` attribute (which must be a tuple "
287300
"of base classes)."
288301
msgstr ""
289302

290-
#: ../../c-api/object.rst:274
303+
#: ../../c-api/object.rst:283
291304
msgid ""
292305
"Compute and return the hash value of an object *o*. On failure, return "
293306
"``-1``. This is the equivalent of the Python expression ``hash(o)``."
294307
msgstr ""
295308

296-
#: ../../c-api/object.rst:277
309+
#: ../../c-api/object.rst:286
297310
msgid ""
298311
"The return type is now Py_hash_t. This is a signed integer the same size "
299312
"as :c:type:`Py_ssize_t`."
300313
msgstr ""
301314

302-
#: ../../c-api/object.rst:284
315+
#: ../../c-api/object.rst:293
303316
msgid ""
304317
"Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` "
305318
"and return ``-1``. This function receives special treatment when stored in a "
306319
"``tp_hash`` slot, allowing a type to explicitly indicate to the interpreter "
307320
"that it is not hashable."
308321
msgstr ""
309322

310-
#: ../../c-api/object.rst:292
323+
#: ../../c-api/object.rst:301
311324
msgid ""
312325
"Returns ``1`` if the object *o* is considered to be true, and ``0`` "
313326
"otherwise. This is equivalent to the Python expression ``not not o``. On "
314327
"failure, return ``-1``."
315328
msgstr ""
316329

317-
#: ../../c-api/object.rst:299
330+
#: ../../c-api/object.rst:308
318331
msgid ""
319332
"Returns ``0`` if the object *o* is considered to be true, and ``1`` "
320333
"otherwise. This is equivalent to the Python expression ``not o``. On "
321334
"failure, return ``-1``."
322335
msgstr ""
323336

324-
#: ../../c-api/object.rst:308
337+
#: ../../c-api/object.rst:317
325338
msgid ""
326339
"When *o* is non-``NULL``, returns a type object corresponding to the object "
327340
"type of object *o*. On failure, raises :exc:`SystemError` and returns "
@@ -332,21 +345,21 @@ msgid ""
332345
"incremented reference count is needed."
333346
msgstr ""
334347

335-
#: ../../c-api/object.rst:319
348+
#: ../../c-api/object.rst:328
336349
msgid ""
337350
"Return non-zero if the object *o* is of type *type* or a subtype of *type*, "
338351
"and ``0`` otherwise. Both parameters must be non-``NULL``."
339352
msgstr ""
340353

341-
#: ../../c-api/object.rst:328
354+
#: ../../c-api/object.rst:337
342355
msgid ""
343356
"Return the length of object *o*. If the object *o* provides either the "
344357
"sequence and mapping protocols, the sequence length is returned. On error, "
345358
"``-1`` is returned. This is the equivalent to the Python expression "
346359
"``len(o)``."
347360
msgstr ""
348361

349-
#: ../../c-api/object.rst:335
362+
#: ../../c-api/object.rst:344
350363
msgid ""
351364
"Return an estimated length for the object *o*. First try to return its "
352365
"actual length, then an estimate using :meth:`~object.__length_hint__`, and "
@@ -355,26 +368,26 @@ msgid ""
355368
"defaultvalue)``."
356369
msgstr ""
357370

358-
#: ../../c-api/object.rst:345
371+
#: ../../c-api/object.rst:354
359372
msgid ""
360373
"Return element of *o* corresponding to the object *key* or ``NULL`` on "
361374
"failure. This is the equivalent of the Python expression ``o[key]``."
362375
msgstr ""
363376

364-
#: ../../c-api/object.rst:351
377+
#: ../../c-api/object.rst:360
365378
msgid ""
366379
"Map the object *key* to the value *v*. Raise an exception and return ``-1`` "
367380
"on failure; return ``0`` on success. This is the equivalent of the Python "
368381
"statement ``o[key] = v``. This function *does not* steal a reference to *v*."
369382
msgstr ""
370383

371-
#: ../../c-api/object.rst:359
384+
#: ../../c-api/object.rst:368
372385
msgid ""
373386
"Remove the mapping for the object *key* from the object *o*. Return ``-1`` "
374387
"on failure. This is equivalent to the Python statement ``del o[key]``."
375388
msgstr ""
376389

377-
#: ../../c-api/object.rst:365
390+
#: ../../c-api/object.rst:374
378391
msgid ""
379392
"This is equivalent to the Python expression ``dir(o)``, returning a "
380393
"(possibly empty) list of strings appropriate for the object argument, or "
@@ -384,15 +397,15 @@ msgid ""
384397
"`PyErr_Occurred` will return false."
385398
msgstr ""
386399

387-
#: ../../c-api/object.rst:374
400+
#: ../../c-api/object.rst:383
388401
msgid ""
389402
"This is equivalent to the Python expression ``iter(o)``. It returns a new "
390403
"iterator for the object argument, or the object itself if the object is "
391404
"already an iterator. Raises :exc:`TypeError` and returns ``NULL`` if the "
392405
"object cannot be iterated."
393406
msgstr ""
394407

395-
#: ../../c-api/object.rst:382
408+
#: ../../c-api/object.rst:391
396409
msgid ""
397410
"This is the equivalent to the Python expression ``aiter(o)``. Takes an :"
398411
"class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. "

c-api/weakref.po

+14-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.11\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2022-10-15 20:43+0000\n"
11+
"POT-Creation-Date: 2023-03-26 00:17+0000\n"
1212
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
1313
"Last-Translator: Leon H.\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -87,3 +87,16 @@ msgstr ""
8787
#: ../../c-api/weakref.rst:69
8888
msgid "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking."
8989
msgstr ""
90+
91+
#: ../../c-api/weakref.rst:74
92+
msgid ""
93+
"This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler "
94+
"to clear weak references."
95+
msgstr ""
96+
97+
#: ../../c-api/weakref.rst:77
98+
msgid ""
99+
"This iterates through the weak references for *object* and calls callbacks "
100+
"for those references which have one. It returns when all callbacks have been "
101+
"attempted."
102+
msgstr ""

0 commit comments

Comments
 (0)