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

Commit66989dd

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.14 (#1172)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>Co-authored-by: Matt.Wang <mattwang44@gmail.com>
1 parentd423925 commit66989dd

25 files changed

+1914
-1639
lines changed

‎c-api/datetime.po‎

Lines changed: 119 additions & 54 deletions
Large diffs are not rendered by default.

‎c-api/dict.po‎

Lines changed: 127 additions & 10 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-13 23:16+0000\n"
11+
"POT-Creation-Date:2025-11-18 00:15+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-"
@@ -83,7 +83,7 @@ msgstr ""
8383

8484
#:../../c-api/dict.rst:69
8585
msgid"Return a new dictionary that contains the same key-value pairs as *p*."
86-
msgstr""
86+
msgstr"回傳一個新的字典,包含與 *p* 相同的鍵值對。"
8787

8888
#:../../c-api/dict.rst:74
8989
msgid""
@@ -129,7 +129,7 @@ msgstr ""
129129

130130
#:../../c-api/dict.rst:109
131131
msgid"If the key is missing, set *\\*result* to ``NULL`` and return ``0``."
132-
msgstr""
132+
msgstr"如果鍵不存在,將 *\\*result* 設為 ``NULL`` 並回傳 ``0``。"
133133

134134
#:../../c-api/dict.rst:110../../c-api/dict.rst:207
135135
msgid"On error, raise an exception and return ``-1``."
@@ -271,7 +271,7 @@ msgstr "回傳字典中項目的數量。此與於字典呼叫 ``len(p)`` 等效
271271

272272
#:../../c-api/dict.rst:250
273273
msgid"Similar to :c:func:`PyDict_Size`, but without error checking."
274-
msgstr""
274+
msgstr"和 :c:func:`PyDict_Size` 類似,但沒有錯誤檢查。"
275275

276276
#:../../c-api/dict.rst:255
277277
msgid""
@@ -301,6 +301,13 @@ msgid ""
301301
" ...\n"
302302
"}"
303303
msgstr""
304+
"PyObject *key, *value;\n"
305+
"Py_ssize_t pos = 0;\n"
306+
"\n"
307+
"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n"
308+
" /* 用值做一些有趣的事情... */\n"
309+
" ...\n"
310+
"}"
304311

305312
#:../../c-api/dict.rst:276
306313
msgid""
@@ -526,8 +533,8 @@ msgid ""
526533
"currently equivalent to :c:expr:`PyDictKeys_Check(op) || "
527534
"PyDictItems_Check(op)`. This function always succeeds."
528535
msgstr""
529-
"若 *op* 是一個字典中集合的視圖則會回傳 true。這目前等同於 :c:expr:`PyDictKeys_Check(op) ||"
530-
"PyDictItems_Check(op)`。此函式每次都會執行成功。"
536+
"若 *op* 是一個字典中集合的視圖則會回傳 true。這目前等同於 :c:expr:"
537+
"`PyDictKeys_Check(op) ||PyDictItems_Check(op)`。此函式每次都會執行成功。"
531538

532539
#:../../c-api/dict.rst:448
533540
msgid""
@@ -563,7 +570,120 @@ msgstr ""
563570
msgid""
564571
"Return true if *op* is an instance of a dictionary items view. This function "
565572
"always succeeds."
566-
msgstr"若 *op* 是一個字典項目視圖的實例則會回傳 true。此函式每次都會執行成功。"
573+
msgstr""
574+
"若 *op* 是一個字典項目視圖的實例則會回傳 true。此函式每次都會執行成功。"
575+
576+
#:../../c-api/dict.rst:483
577+
msgid"Ordered Dictionaries"
578+
msgstr"有序字典"
579+
580+
#:../../c-api/dict.rst:485
581+
msgid""
582+
"Python's C API provides interface for :class:`collections.OrderedDict` from "
583+
"C. Since Python 3.7, dictionaries are ordered by default, so there is "
584+
"usually little need for these functions; prefer ``PyDict*`` where possible."
585+
msgstr""
586+
587+
#:../../c-api/dict.rst:492
588+
msgid""
589+
"Type object for ordered dictionaries. This is the same object as :class:"
590+
"`collections.OrderedDict` in the Python layer."
591+
msgstr""
592+
"有序字典的型別物件。此與 Python 層中的 :class:`collections.OrderedDict` 為同一個物件。"
593+
594+
#:../../c-api/dict.rst:498
595+
msgid""
596+
"Return true if *od* is an ordered dictionary object or an instance of a "
597+
"subtype of the :class:`~collections.OrderedDict` type. This function always "
598+
"succeeds."
599+
msgstr""
600+
"若 *od* 是一個有序字典物件或 :class:`~collections.OrderedDict` 的子型別實例則會回傳 true。"
601+
"此函式每次都會執行成功。"
602+
603+
#:../../c-api/dict.rst:505
604+
msgid""
605+
"Return true if *od* is an ordered dictionary object, but not an instance of "
606+
"a subtype of the :class:`~collections.OrderedDict` type. This function "
607+
"always succeeds."
608+
msgstr""
609+
"若 *od* 是一個有序字典物件但並不是一個 :class:`~collections.OrderedDict` 子型別的實例,"
610+
"則回傳 true。此函式每次都會執行成功。"
611+
612+
#:../../c-api/dict.rst:512
613+
msgid"Analogous to :c:type:`PyDictKeys_Type` for ordered dictionaries."
614+
msgstr""
615+
616+
#:../../c-api/dict.rst:517
617+
msgid"Analogous to :c:type:`PyDictValues_Type` for ordered dictionaries."
618+
msgstr""
619+
620+
#:../../c-api/dict.rst:522
621+
msgid"Analogous to :c:type:`PyDictItems_Type` for ordered dictionaries."
622+
msgstr""
623+
624+
#:../../c-api/dict.rst:527
625+
msgid"Return a new empty ordered dictionary, or ``NULL`` on failure."
626+
msgstr"回傳一個新的空有序字典,或在失敗時回傳 ``NULL``。"
627+
628+
#:../../c-api/dict.rst:529
629+
msgid"This is analogous to :c:func:`PyDict_New`."
630+
msgstr"這和 :c:func:`PyDict_New` 類似。"
631+
632+
#:../../c-api/dict.rst:534
633+
msgid""
634+
"Insert *value* into the ordered dictionary *od* with a key of *key*. Return "
635+
"``0`` on success or ``-1`` with an exception set on failure."
636+
msgstr""
637+
638+
#:../../c-api/dict.rst:537
639+
msgid"This is analogous to :c:func:`PyDict_SetItem`."
640+
msgstr"這和 :c:func:`PyDict_SetItem` 類似。"
641+
642+
#:../../c-api/dict.rst:542
643+
msgid""
644+
"Remove the entry in the ordered dictionary *od* with key *key*. Return ``0`` "
645+
"on success or ``-1`` with an exception set on failure."
646+
msgstr""
647+
648+
#:../../c-api/dict.rst:545
649+
msgid"This is analogous to :c:func:`PyDict_DelItem`."
650+
msgstr"這和 :c:func:`PyDict_DelItem` 類似。"
651+
652+
#:../../c-api/dict.rst:548
653+
msgid"These are :term:`soft deprecated` aliases to ``PyDict`` APIs:"
654+
msgstr""
655+
656+
#:../../c-api/dict.rst:555
657+
msgid"``PyODict``"
658+
msgstr"``PyODict``"
659+
660+
#:../../c-api/dict.rst:556
661+
msgid"``PyDict``"
662+
msgstr"``PyDict``"
663+
664+
#:../../c-api/dict.rst:558
665+
msgid":c:func:`PyDict_GetItem`"
666+
msgstr":c:func:`PyDict_GetItem`"
667+
668+
#:../../c-api/dict.rst:560
669+
msgid":c:func:`PyDict_GetItemWithError`"
670+
msgstr":c:func:`PyDict_GetItemWithError`"
671+
672+
#:../../c-api/dict.rst:562
673+
msgid":c:func:`PyDict_GetItemString`"
674+
msgstr":c:func:`PyDict_GetItemString`"
675+
676+
#:../../c-api/dict.rst:564
677+
msgid":c:func:`PyDict_Contains`"
678+
msgstr":c:func:`PyDict_Contains`"
679+
680+
#:../../c-api/dict.rst:566
681+
msgid":c:func:`PyDict_Size`"
682+
msgstr":c:func:`PyDict_Size`"
683+
684+
#:../../c-api/dict.rst:568
685+
msgid":c:func:`PyDict_GET_SIZE`"
686+
msgstr":c:func:`PyDict_GET_SIZE`"
567687

568688
#:../../c-api/dict.rst:8
569689
msgid"object"
@@ -580,6 +700,3 @@ msgstr "built-in function(內建函式)"
580700
#:../../c-api/dict.rst:242
581701
msgid"len"
582702
msgstr"len"
583-
584-
#~ msgid "PyUnicode_FromString()"
585-
#~ msgstr "PyUnicode_FromString()"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp