Skip to content

Commit acc0f55

Browse files
sync with cpython 758278c2
1 parent bbfa260 commit acc0f55

3 files changed

Lines changed: 806 additions & 775 deletions

File tree

‎c-api/marshal.po‎

Lines changed: 30 additions & 12 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-05 00:16+0000\n"
11+
"POT-Creation-Date: 2026-10-12 00:24+0000\n"
1212
"PO-Revision-Date: 2025-06-28 02:44+0800\n"
1313
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -60,7 +60,7 @@ msgstr ""
6060
"低有效 32 位元;無論原生 :c:expr:`long` 型別的大小如何。*version* 表示檔案的"
6161
"格式。"
6262

63-
#: ../../c-api/marshal.rst:29 ../../c-api/marshal.rst:37
63+
#: ../../c-api/marshal.rst:29 ../../c-api/marshal.rst:43
6464
msgid ""
6565
"This function can fail, in which case it sets the error indicator. Use :c:"
6666
"func:`PyErr_Occurred` to check for that."
@@ -70,23 +70,41 @@ msgstr ""
7070

7171
#: ../../c-api/marshal.rst:34
7272
msgid ""
73+
"In Python 3.15 and earlier, this function does not set the error indicator "
74+
"if writing to *file* fails. The same caveat applies as for :c:func:"
75+
"`PyMarshal_WriteObjectToFile`."
76+
msgstr ""
77+
78+
#: ../../c-api/marshal.rst:40
79+
msgid ""
7380
"Marshal a Python object, *value*, to *file*. *version* indicates the file "
7481
"format."
7582
msgstr ""
7683
"將一個 Python 物件 *value* marshal 為 *file*。*version* 表示檔案的格式。"
7784

78-
#: ../../c-api/marshal.rst:42
85+
#: ../../c-api/marshal.rst:48
86+
msgid ""
87+
"In Python 3.15 and earlier, this function can write only part of the data to "
88+
"*file* and return without setting the error indicator, for example if "
89+
"*value* contains an object which cannot be marshalled or if writing to "
90+
"*file* fails (see :gh:`155907`). Code which has to support these versions "
91+
"cannot rely on :c:func:`PyErr_Occurred` alone to know that all the data was "
92+
"written. It can use :c:func:`PyMarshal_WriteObjectToString` and write the "
93+
"result itself, or validate what was written."
94+
msgstr ""
95+
96+
#: ../../c-api/marshal.rst:59
7997
msgid ""
8098
"Return a bytes object containing the marshalled representation of *value*. "
8199
"*version* indicates the file format."
82100
msgstr ""
83101
"回傳一個位元組物件,包含 *value* 的 marshal 表示。*version* 為檔案的格式。"
84102

85-
#: ../../c-api/marshal.rst:46
103+
#: ../../c-api/marshal.rst:63
86104
msgid "The following functions allow marshalled values to be read back in."
87105
msgstr "以下函式允許將 marshal 過後的值讀取回來。"
88106

89-
#: ../../c-api/marshal.rst:51
107+
#: ../../c-api/marshal.rst:68
90108
msgid ""
91109
"Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened "
92110
"for reading. Only a 32-bit value can be read in using this function, "
@@ -95,13 +113,13 @@ msgstr ""
95113
"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`long`。"
96114
"無論 :c:expr:`long` 的原生大小如何,這個函式只能讀取 32 位元的值。"
97115

98-
#: ../../c-api/marshal.rst:55 ../../c-api/marshal.rst:65
116+
#: ../../c-api/marshal.rst:72 ../../c-api/marshal.rst:82
99117
msgid ""
100118
"On error, sets the appropriate exception (:exc:`EOFError`) and returns "
101119
"``-1``."
102120
msgstr "在錯誤發生時,會設定合適的例外(:exc:`EOFError`)並回傳 ``-1``。"
103121

104-
#: ../../c-api/marshal.rst:61
122+
#: ../../c-api/marshal.rst:78
105123
msgid ""
106124
"Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened "
107125
"for reading. Only a 16-bit value can be read in using this function, "
@@ -110,23 +128,23 @@ msgstr ""
110128
"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`short`。"
111129
"無論 :c:expr:`short` 的原生大小如何,這個函式只能讀取 16 位元的值。"
112130

113-
#: ../../c-api/marshal.rst:71
131+
#: ../../c-api/marshal.rst:88
114132
msgid ""
115133
"Return a Python object from the data stream in a :c:expr:`FILE*` opened for "
116134
"reading."
117135
msgstr ""
118136
"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 Python 物件。"
119137

120-
#: ../../c-api/marshal.rst:74 ../../c-api/marshal.rst:88
121-
#: ../../c-api/marshal.rst:97
138+
#: ../../c-api/marshal.rst:91 ../../c-api/marshal.rst:105
139+
#: ../../c-api/marshal.rst:114
122140
msgid ""
123141
"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` "
124142
"or :exc:`TypeError`) and returns ``NULL``."
125143
msgstr ""
126144
"在錯誤發生時,會設定合適的例外(:exc:`EOFError`、:exc:`ValueError` 或 :exc:"
127145
"`TypeError`)並回傳 ``NULL``。"
128146

129-
#: ../../c-api/marshal.rst:80
147+
#: ../../c-api/marshal.rst:97
130148
msgid ""
131149
"Return a Python object from the data stream in a :c:expr:`FILE*` opened for "
132150
"reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function "
@@ -142,7 +160,7 @@ msgstr ""
142160
"而不是從檔案中逐位元組讀取。只有在確定不會從檔案中讀取其他內容時,才使用這個"
143161
"變體。"
144162

145-
#: ../../c-api/marshal.rst:94
163+
#: ../../c-api/marshal.rst:111
146164
msgid ""
147165
"Return a Python object from the data stream in a byte buffer containing "
148166
"*len* bytes pointed to by *data*."

‎library/idle.po‎

Lines changed: 22 additions & 22 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: 2026-01-21 00:15+0000\n"
9+
"POT-Creation-Date: 2026-10-12 00:24+0000\n"
1010
"PO-Revision-Date: 2018-05-23 16:03+0000\n"
1111
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1554,19 +1554,19 @@ msgid ""
15541554
"mainloop call when running in standard Python."
15551555
msgstr ""
15561556

1557-
#: ../../library/idle.rst:937
1557+
#: ../../library/idle.rst:939
15581558
msgid "Running without a subprocess"
15591559
msgstr ""
15601560

1561-
#: ../../library/idle.rst:939
1561+
#: ../../library/idle.rst:941
15621562
msgid ""
15631563
"By default, IDLE executes user code in a separate subprocess via a socket, "
15641564
"which uses the internal loopback interface. This connection is not "
15651565
"externally visible and no data is sent to or received from the internet. If "
15661566
"firewall software complains anyway, you can ignore it."
15671567
msgstr ""
15681568

1569-
#: ../../library/idle.rst:944
1569+
#: ../../library/idle.rst:946
15701570
msgid ""
15711571
"If the attempt to make the socket connection fails, Idle will notify you. "
15721572
"Such failures are sometimes transient, but if persistent, the problem may be "
@@ -1575,7 +1575,7 @@ msgid ""
15751575
"command line switch."
15761576
msgstr ""
15771577

1578-
#: ../../library/idle.rst:950
1578+
#: ../../library/idle.rst:952
15791579
msgid ""
15801580
"If IDLE is started with the -n command line switch it will run in a single "
15811581
"process and will not create the subprocess which runs the RPC Python "
@@ -1589,15 +1589,15 @@ msgid ""
15891589
"at all possible."
15901590
msgstr ""
15911591

1592-
#: ../../library/idle.rst:965
1592+
#: ../../library/idle.rst:967
15931593
msgid "Help and Preferences"
15941594
msgstr ""
15951595

1596-
#: ../../library/idle.rst:970
1596+
#: ../../library/idle.rst:972
15971597
msgid "Help sources"
15981598
msgstr ""
15991599

1600-
#: ../../library/idle.rst:972
1600+
#: ../../library/idle.rst:974
16011601
msgid ""
16021602
"Help menu entry \"IDLE Help\" displays a formatted html version of the IDLE "
16031603
"chapter of the Library Reference. The result, in a read-only tkinter text "
@@ -1607,7 +1607,7 @@ msgid ""
16071607
"the opened box."
16081608
msgstr ""
16091609

1610-
#: ../../library/idle.rst:980
1610+
#: ../../library/idle.rst:982
16111611
msgid ""
16121612
"Help menu entry \"Python Docs\" opens the extensive sources of help, "
16131613
"including tutorials, available at ``docs.python.org/x.y``, where 'x.y' is "
@@ -1616,17 +1616,17 @@ msgid ""
16161616
"instead."
16171617
msgstr ""
16181618

1619-
#: ../../library/idle.rst:986
1619+
#: ../../library/idle.rst:988
16201620
msgid ""
16211621
"Selected URLs can be added or removed from the help menu at any time using "
16221622
"the General tab of the Configure IDLE dialog."
16231623
msgstr ""
16241624

1625-
#: ../../library/idle.rst:992
1625+
#: ../../library/idle.rst:994
16261626
msgid "Setting preferences"
16271627
msgstr "設定偏好"
16281628

1629-
#: ../../library/idle.rst:994
1629+
#: ../../library/idle.rst:996
16301630
msgid ""
16311631
"The font preferences, highlighting, keys, and general preferences can be "
16321632
"changed via Configure IDLE on the Option menu. Non-default user settings are "
@@ -1635,7 +1635,7 @@ msgid ""
16351635
"or more of the files in ``.idlerc``."
16361636
msgstr ""
16371637

1638-
#: ../../library/idle.rst:1000
1638+
#: ../../library/idle.rst:1002
16391639
msgid ""
16401640
"On the Font tab, see the text sample for the effect of font face and size on "
16411641
"multiple characters in multiple languages. Edit the sample to add other "
@@ -1644,30 +1644,30 @@ msgid ""
16441644
"them to the top of the sample and try changing first size and then font."
16451645
msgstr ""
16461646

1647-
#: ../../library/idle.rst:1007
1647+
#: ../../library/idle.rst:1009
16481648
msgid ""
16491649
"On the Highlights and Keys tab, select a built-in or custom color theme and "
16501650
"key set. To use a newer built-in color theme or key set with older IDLEs, "
16511651
"save it as a new custom theme or key set and it well be accessible to older "
16521652
"IDLEs."
16531653
msgstr ""
16541654

1655-
#: ../../library/idle.rst:1013
1655+
#: ../../library/idle.rst:1015
16561656
msgid "IDLE on macOS"
16571657
msgstr "macOS 上的 IDLE"
16581658

1659-
#: ../../library/idle.rst:1015
1659+
#: ../../library/idle.rst:1017
16601660
msgid ""
16611661
"Under System Preferences: Dock, one can set \"Prefer tabs when opening "
16621662
"documents\" to \"Always\". This setting is not compatible with the tk/"
16631663
"tkinter GUI framework used by IDLE, and it breaks a few IDLE features."
16641664
msgstr ""
16651665

1666-
#: ../../library/idle.rst:1020
1666+
#: ../../library/idle.rst:1022
16671667
msgid "Extensions"
16681668
msgstr ""
16691669

1670-
#: ../../library/idle.rst:1022
1670+
#: ../../library/idle.rst:1024
16711671
msgid ""
16721672
"IDLE contains an extension facility. Preferences for extensions can be "
16731673
"changed with the Extensions tab of the preferences dialog. See the beginning "
@@ -1676,21 +1676,21 @@ msgid ""
16761676
"testing."
16771677
msgstr ""
16781678

1679-
#: ../../library/idle.rst:1030
1679+
#: ../../library/idle.rst:1032
16801680
msgid "idlelib --- implementation of IDLE application"
16811681
msgstr ""
16821682

1683-
#: ../../library/idle.rst:1035
1683+
#: ../../library/idle.rst:1037
16841684
msgid "**Source code:** :source:`Lib/idlelib`"
16851685
msgstr "**原始碼:**\\ :source:`Lib/idlelib/`"
16861686

1687-
#: ../../library/idle.rst:1039
1687+
#: ../../library/idle.rst:1041
16881688
msgid ""
16891689
"The Lib/idlelib package implements the IDLE application. See the rest of "
16901690
"this page for how to use IDLE."
16911691
msgstr ""
16921692

1693-
#: ../../library/idle.rst:1042
1693+
#: ../../library/idle.rst:1044
16941694
msgid ""
16951695
"The files in idlelib are described in idlelib/README.txt. Access it either "
16961696
"in idlelib or click Help => About IDLE on the IDLE menu. This file also "

0 commit comments

Comments
 (0)