Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd6c752c

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython 00087dc4
1 parentfcc079c commitd6c752c

File tree

10 files changed

+1484
-1388
lines changed

10 files changed

+1484
-1388
lines changed

‎c-api/dict.po‎

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version:Python 3.14\n"
1010
"Report-Msgid-Bugs-To:\n"
11-
"POT-Creation-Date:2025-11-03 00:16+0000\n"
11+
"POT-Creation-Date:2025-11-06 00:14+0000\n"
1212
"PO-Revision-Date:2017-09-22 18:26+0000\n"
1313
"Last-Translator:Liang-Bo Wang <me@liang2.tw>\n"
1414
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -270,6 +270,10 @@ msgid ""
270270
msgstr"回傳字典中項目的數量。此與於字典呼叫 ``len(p)`` 等效。"
271271

272272
#:../../c-api/dict.rst:250
273+
msgid"Similar to :c:func:`PyDict_Size`, but without error checking."
274+
msgstr""
275+
276+
#:../../c-api/dict.rst:255
273277
msgid""
274278
"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
275279
"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
@@ -283,11 +287,11 @@ msgid ""
283287
"structure is sparse, the offsets are not consecutive."
284288
msgstr""
285289

286-
#:../../c-api/dict.rst:261
290+
#:../../c-api/dict.rst:266
287291
msgid"For example::"
288292
msgstr"舉例來說: ::"
289293

290-
#:../../c-api/dict.rst:263
294+
#:../../c-api/dict.rst:268
291295
msgid""
292296
"PyObject *key, *value;\n"
293297
"Py_ssize_t pos = 0;\n"
@@ -298,14 +302,14 @@ msgid ""
298302
"}"
299303
msgstr""
300304

301-
#:../../c-api/dict.rst:271
305+
#:../../c-api/dict.rst:276
302306
msgid""
303307
"The dictionary *p* should not be mutated during iteration. It is safe to "
304308
"modify the values of the keys as you iterate over the dictionary, but only "
305309
"so long as the set of keys does not change. For example::"
306310
msgstr""
307311

308-
#:../../c-api/dict.rst:275
312+
#:../../c-api/dict.rst:280
309313
msgid""
310314
"PyObject *key, *value;\n"
311315
"Py_ssize_t pos = 0;\n"
@@ -343,14 +347,14 @@ msgstr ""
343347
" Py_DECREF(o);\n"
344348
"}"
345349

346-
#:../../c-api/dict.rst:293
350+
#:../../c-api/dict.rst:298
347351
msgid""
348352
"The function is not thread-safe in the :term:`free-threaded <free "
349353
"threading>` build without external synchronization. You can use :c:macro:"
350354
"`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::"
351355
msgstr""
352356

353-
#:../../c-api/dict.rst:298
357+
#:../../c-api/dict.rst:303
354358
msgid""
355359
"Py_BEGIN_CRITICAL_SECTION(self->dict);\n"
356360
"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n"
@@ -364,7 +368,7 @@ msgstr ""
364368
"}\n"
365369
"Py_END_CRITICAL_SECTION();"
366370

367-
#:../../c-api/dict.rst:306
371+
#:../../c-api/dict.rst:311
368372
msgid""
369373
"On the free-threaded build, this function can be used safely inside a "
370374
"critical section. However, the references returned for *pkey* and *pvalue* "
@@ -375,7 +379,7 @@ msgid ""
375379
"`Py_NewRef`)."
376380
msgstr""
377381

378-
#:../../c-api/dict.rst:316
382+
#:../../c-api/dict.rst:321
379383
msgid""
380384
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
381385
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -385,7 +389,7 @@ msgid ""
385389
"or ``-1`` if an exception was raised."
386390
msgstr""
387391

388-
#:../../c-api/dict.rst:326
392+
#:../../c-api/dict.rst:331
389393
msgid""
390394
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
391395
"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
@@ -394,7 +398,7 @@ msgid ""
394398
"exception was raised."
395399
msgstr""
396400

397-
#:../../c-api/dict.rst:335
401+
#:../../c-api/dict.rst:340
398402
msgid""
399403
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
400404
"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -403,7 +407,7 @@ msgid ""
403407
"if an exception was raised. Equivalent Python (except for the return value)::"
404408
msgstr""
405409

406-
#:../../c-api/dict.rst:342
410+
#:../../c-api/dict.rst:347
407411
msgid""
408412
"def PyDict_MergeFromSeq2(a, seq2, override):\n"
409413
" for key, value in seq2:\n"
@@ -415,49 +419,49 @@ msgstr ""
415419
" if override or key not in a:\n"
416420
" a[key] = value"
417421

418-
#:../../c-api/dict.rst:349
422+
#:../../c-api/dict.rst:354
419423
msgid""
420424
"Register *callback* as a dictionary watcher. Return a non-negative integer "
421425
"id which must be passed to future calls to :c:func:`PyDict_Watch`. In case "
422426
"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
423427
"exception."
424428
msgstr""
425429

426-
#:../../c-api/dict.rst:358
430+
#:../../c-api/dict.rst:363
427431
msgid""
428432
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
429433
"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the "
430434
"given *watcher_id* was never registered.)"
431435
msgstr""
432436

433-
#:../../c-api/dict.rst:366
437+
#:../../c-api/dict.rst:371
434438
msgid""
435439
"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:"
436440
"func:`PyDict_AddWatcher` will be called when *dict* is modified or "
437441
"deallocated. Return ``0`` on success or ``-1`` on error."
438442
msgstr""
439443

440-
#:../../c-api/dict.rst:374
444+
#:../../c-api/dict.rst:379
441445
msgid""
442446
"Mark dictionary *dict* as no longer watched. The callback granted "
443447
"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
444448
"*dict* is modified or deallocated. The dict must previously have been "
445449
"watched by this watcher. Return ``0`` on success or ``-1`` on error."
446450
msgstr""
447451

448-
#:../../c-api/dict.rst:383
452+
#:../../c-api/dict.rst:388
449453
msgid""
450454
"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
451455
"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
452456
"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED``, or "
453457
"``PyDict_EVENT_DEALLOCATED``."
454458
msgstr""
455459

456-
#:../../c-api/dict.rst:391
460+
#:../../c-api/dict.rst:396
457461
msgid"Type of a dict watcher callback function."
458462
msgstr""
459463

460-
#:../../c-api/dict.rst:393
464+
#:../../c-api/dict.rst:398
461465
msgid""
462466
"If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both "
463467
"*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` "
@@ -466,22 +470,22 @@ msgid ""
466470
"dictionary and *new_value* will be ``NULL``."
467471
msgstr""
468472

469-
#:../../c-api/dict.rst:399
473+
#:../../c-api/dict.rst:404
470474
msgid""
471475
"``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another "
472476
"dict is merged into it. To maintain efficiency of this operation, per-key "
473477
"``PyDict_EVENT_ADDED`` events are not issued in this case; instead a single "
474478
"``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary."
475479
msgstr""
476480

477-
#:../../c-api/dict.rst:405
481+
#:../../c-api/dict.rst:410
478482
msgid""
479483
"The callback may inspect but must not modify *dict*; doing so could have "
480484
"unpredictable effects, including infinite recursion. Do not trigger Python "
481485
"code execution in the callback, as it could modify the dict as a side effect."
482486
msgstr""
483487

484-
#:../../c-api/dict.rst:409
488+
#:../../c-api/dict.rst:414
485489
msgid""
486490
"If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the "
487491
"callback to the about-to-be-destroyed dictionary will resurrect it and "
@@ -490,20 +494,20 @@ msgid ""
490494
"again."
491495
msgstr""
492496

493-
#:../../c-api/dict.rst:415
497+
#:../../c-api/dict.rst:420
494498
msgid""
495499
"Callbacks occur before the notified modification to *dict* takes place, so "
496500
"the prior state of *dict* can be inspected."
497501
msgstr""
498502

499-
#:../../c-api/dict.rst:418
503+
#:../../c-api/dict.rst:423
500504
msgid""
501505
"If the callback sets an exception, it must return ``-1``; this exception "
502506
"will be printed as an unraisable exception using :c:func:"
503507
"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
504508
msgstr""
505509

506-
#:../../c-api/dict.rst:422
510+
#:../../c-api/dict.rst:427
507511
msgid""
508512
"There may already be a pending exception set on entry to the callback. In "
509513
"this case, the callback should return ``0`` with the same exception still "

‎c-api/float.po‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,33 @@ msgstr ""
143143
"打包例程從 C :c:expr:`double` 產生位元組字串,而解包例程則從這樣的位元組字串產生 "
144144
"C :c:expr:`double`。後綴(2、4 或 8)標示了位元組字串中的位元組數。"
145145

146+
#:../../c-api/float.rst:107
147+
msgid""
148+
"Return :data:`math.inf` or :data:`-math.inf <math.inf>` from a function, "
149+
"depending on the sign of *sign*."
150+
msgstr""
151+
152+
#:../../c-api/float.rst:93
153+
msgid"On most platforms, this is equivalent to the following::"
154+
msgstr""
155+
156+
#:../../c-api/float.rst:95
157+
msgid"return PyFloat_FromDouble(copysign(INFINITY, sign));"
158+
msgstr""
159+
160+
#:../../c-api/float.rst:99
161+
msgid"Pack and Unpack functions"
162+
msgstr""
163+
164+
#:../../c-api/float.rst:101
165+
msgid""
166+
"The pack and unpack functions provide an efficient platform-independent way "
167+
"to store floating-point values as byte strings. The Pack routines produce a "
168+
"bytes string from a C :c:expr:`double`, and the Unpack routines produce a C :"
169+
"c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies "
170+
"the number of bytes in the bytes string."
171+
msgstr""
172+
146173
#:../../c-api/float.rst:107
147174
msgid""
148175
"On platforms that appear to use IEEE 754 formats these functions work by "

‎c-api/iterator.po‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.14\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2023-07-24 00:03+0000\n"
10+
"POT-Creation-Date:2025-11-06 00:14+0000\n"
1111
"PO-Revision-Date:2017-09-22 18:26+0000\n"
1212
"Last-Translator:Leon H.\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -76,3 +76,26 @@ msgid ""
7676
"should return the next item in the iteration. When *callable* returns a "
7777
"value equal to *sentinel*, the iteration will be terminated."
7878
msgstr""
79+
80+
#:../../c-api/iterator.rst:56
81+
#,fuzzy
82+
msgid"Other Iterator Objects"
83+
msgstr"疊代器(Iterator)物件"
84+
85+
#:../../c-api/iterator.rst:73
86+
msgid"Type objects for iterators of various built-in objects."
87+
msgstr""
88+
89+
#:../../c-api/iterator.rst:75
90+
msgid""
91+
"Do not create instances of these directly; prefer calling :c:func:"
92+
"`PyObject_GetIter` instead."
93+
msgstr""
94+
95+
#:../../c-api/iterator.rst:78
96+
msgid""
97+
"Note that there is no guarantee that a given built-in type uses a given "
98+
"iterator type. For example, iterating over :class:`range` will use one of "
99+
"two iterator types depending on the size of the range. Other types may start "
100+
"using a similar scheme in the future, without warning."
101+
msgstr""

‎c-api/memoryview.po‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version:Python 3.14\n"
88
"Report-Msgid-Bugs-To:\n"
9-
"POT-Creation-Date:2024-01-30 00:03+0000\n"
9+
"POT-Creation-Date:2025-11-06 00:14+0000\n"
1010
"PO-Revision-Date:2015-12-09 17:51+0000\n"
1111
"Last-Translator:Liang-Bo Wang <me@liang2.tw>\n"
1212
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -30,34 +30,40 @@ msgstr ""
3030

3131
#:../../c-api/memoryview.rst:18
3232
msgid""
33+
"This instance of :c:type:`PyTypeObject` represents the Python memoryview "
34+
"type. This is the same object as :class:`memoryview` in the Python layer."
35+
msgstr""
36+
37+
#:../../c-api/memoryview.rst:24
38+
msgid""
3339
"Create a memoryview object from an object that provides the buffer "
3440
"interface. If *obj* supports writable buffer exports, the memoryview object "
3541
"will be read/write, otherwise it may be either read-only or read/write at "
3642
"the discretion of the exporter."
3743
msgstr""
3844

39-
#:../../c-api/memoryview.rst:26
45+
#:../../c-api/memoryview.rst:32
4046
msgid"Flag to request a readonly buffer."
4147
msgstr""
4248

43-
#:../../c-api/memoryview.rst:31
49+
#:../../c-api/memoryview.rst:37
4450
msgid"Flag to request a writable buffer."
4551
msgstr""
4652

47-
#:../../c-api/memoryview.rst:36
53+
#:../../c-api/memoryview.rst:42
4854
msgid""
4955
"Create a memoryview object using *mem* as the underlying buffer. *flags* can "
5056
"be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`."
5157
msgstr""
5258

53-
#:../../c-api/memoryview.rst:43
59+
#:../../c-api/memoryview.rst:49
5460
msgid""
5561
"Create a memoryview object wrapping the given buffer structure *view*. For "
5662
"simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred "
5763
"function."
5864
msgstr""
5965

60-
#:../../c-api/memoryview.rst:49
66+
#:../../c-api/memoryview.rst:55
6167
msgid""
6268
"Create a memoryview object to a :term:`contiguous` chunk of memory (in "
6369
"either 'C' or 'F'ortran *order*) from an object that defines the buffer "
@@ -66,26 +72,26 @@ msgid ""
6672
"new bytes object."
6773
msgstr""
6874

69-
#:../../c-api/memoryview.rst:55
75+
#:../../c-api/memoryview.rst:61
7076
msgid""
7177
"*buffertype* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`."
7278
msgstr""
7379

74-
#:../../c-api/memoryview.rst:60
80+
#:../../c-api/memoryview.rst:66
7581
msgid""
7682
"Return true if the object *obj* is a memoryview object. It is not currently "
7783
"allowed to create subclasses of :class:`memoryview`. This function always "
7884
"succeeds."
7985
msgstr""
8086

81-
#:../../c-api/memoryview.rst:67
87+
#:../../c-api/memoryview.rst:73
8288
msgid""
8389
"Return a pointer to the memoryview's private copy of the exporter's buffer. "
8490
"*mview* **must** be a memoryview instance; this macro doesn't check its "
8591
"type, you must do it yourself or you will risk crashes."
8692
msgstr""
8793

88-
#:../../c-api/memoryview.rst:73
94+
#:../../c-api/memoryview.rst:79
8995
msgid""
9096
"Return either a pointer to the exporting object that the memoryview is based "
9197
"on or ``NULL`` if the memoryview has been created by one of the functions :c:"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp