Skip to content

Commit 9c5e305

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.12 (#508)
* sync with cpython 6bbcd792 * sync with cpython abaf89d9 * resolve fuzzy entries * sync with cpython 80aebd54 * resolve fuzzy entries --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Wang <[email protected]>
1 parent 84eb0d5 commit 9c5e305

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3427
-3132
lines changed

c-api/allocation.po

+34-33
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: Python 3.12\n"
1212
"Report-Msgid-Bugs-To: \n"
13-
"POT-Creation-Date: 2022-07-06 00:17+0000\n"
13+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1414
"PO-Revision-Date: 2022-10-16 15:35+0800\n"
1515
"Last-Translator: Matt Wang <[email protected]>\n"
1616
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -49,48 +49,49 @@ msgstr ""
4949
#: ../../c-api/allocation.rst:32
5050
msgid ""
5151
"Allocate a new Python object using the C structure type *TYPE* and the "
52-
"Python type object *type*. Fields not defined by the Python object header "
53-
"are not initialized; the object's reference count will be one. The size of "
54-
"the memory allocation is determined from the :c:member:`~PyTypeObject."
55-
"tp_basicsize` field of the type object."
52+
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
53+
"Python object header are not initialized; the object's reference count will "
54+
"be one. The size of the memory allocation is determined from the :c:member:"
55+
"`~PyTypeObject.tp_basicsize` field of the type object."
5656
msgstr ""
57-
"使用 C 結構型別 *TYPE* 和 Python 型別物件 *type* 分配一個新的 Python 物件。未"
58-
"在該 Python 物件標頭 (header) 中定義的欄位不會被初始化;物件的參照計數將為"
59-
"。記憶體分配大小由 type 物件的 :c:member:`~PyTypeObject.tp_basicsize` 欄位"
60-
"來指定。"
57+
"使用 C 結構型別 *TYPE* 和 Python 型別物件 *typeobj* (``PyTypeObject*``) 分配"
58+
"一個新的 Python 物件。未在該 Python 物件標頭 (header) 中定義的欄位不會被初始"
59+
"化;物件的參照計數將為一。記憶體分配大小由 type 物件的 :c:member:"
60+
"`~PyTypeObject.tp_basicsize` 欄位來指定。"
6161

62-
#: ../../c-api/allocation.rst:41
62+
#: ../../c-api/allocation.rst:42
6363
msgid ""
6464
"Allocate a new Python object using the C structure type *TYPE* and the "
65-
"Python type object *type*. Fields not defined by the Python object header "
66-
"are not initialized. The allocated memory allows for the *TYPE* structure "
67-
"plus *size* fields of the size given by the :c:member:`~PyTypeObject."
68-
"tp_itemsize` field of *type*. This is useful for implementing objects like "
69-
"tuples, which are able to determine their size at construction time. "
70-
"Embedding the array of fields into the same allocation decreases the number "
71-
"of allocations, improving the memory management efficiency."
65+
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
66+
"Python object header are not initialized. The allocated memory allows for "
67+
"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given "
68+
"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is "
69+
"useful for implementing objects like tuples, which are able to determine "
70+
"their size at construction time. Embedding the array of fields into the "
71+
"same allocation decreases the number of allocations, improving the memory "
72+
"management efficiency."
7273
msgstr ""
73-
"使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *type* 分配一個新的 Python 物"
74-
"。未在該 Python 物件標頭中定義的欄位不會被初始化。記憶體空間預留了 *TYPE* "
75-
"結構大小再加上 *type* 物件中 :c:member:`~PyTypeObject.tp_itemsize` 欄位提供"
76-
"*size* 欄位的值。這對於實現如 tuple 這種能夠在建立期間決定自己大小的物件是"
77-
"很實用的。將欄位的陣列嵌入到相同的記憶體分配中可以減少記憶體分配的次數,這提"
78-
"高了記憶體管理的效率。"
74+
"使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *typeobj* (``PyTypeObject*``) "
75+
"分配一個新的 Python 物件。未在該 Python 物件標頭中定義的欄位不會被初始化。"
76+
"憶體空間預留了 *TYPE* 結構大小再加上 *typeobj* 物件中 :c:member:"
77+
"`~PyTypeObject.tp_itemsize` 欄位提供的 *size* (``Py_ssize_t``) 欄位的值。這對"
78+
"於實現如 tuple 這種能夠在建立期間決定自己大小的物件是很實用的。將欄位的陣列嵌"
79+
"入到相同的記憶體分配中可以減少記憶體分配的次數,這提高了記憶體管理的效率。"
7980

80-
#: ../../c-api/allocation.rst:53
81+
#: ../../c-api/allocation.rst:56
8182
msgid ""
82-
"Releases memory allocated to an object using :c:func:`PyObject_New` or :c:"
83-
"func:`PyObject_NewVar`. This is normally called from the :c:member:"
83+
"Releases memory allocated to an object using :c:macro:`PyObject_New` or :c:"
84+
"macro:`PyObject_NewVar`. This is normally called from the :c:member:"
8485
"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The "
8586
"fields of the object should not be accessed after this call as the memory is "
8687
"no longer a valid Python object."
8788
msgstr ""
88-
"釋放由 :c:func:`PyObject_New` 或者 :c:func:`PyObject_NewVar` 分配給物件的記憶"
89-
"。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` handler "
90-
"中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的記憶體已"
91-
"不再是一個有效的 Python 物件。"
89+
"釋放由 :c:macro:`PyObject_New` 或者 :c:macro:`PyObject_NewVar` 分配給物件的記"
90+
"憶體。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` "
91+
"handler 中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的"
92+
"記憶體已不再是一個有效的 Python 物件。"
9293

93-
#: ../../c-api/allocation.rst:62
94+
#: ../../c-api/allocation.rst:65
9495
msgid ""
9596
"Object which is visible in Python as ``None``. This should only be accessed "
9697
"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
@@ -99,10 +100,10 @@ msgstr ""
99100
"這個物件像是 Python 中的 ``None``。它只應該透過 :c:macro:`Py_None` 巨集來存"
100101
"取,該巨集的拿到指向該物件的指標。"
101102

102-
#: ../../c-api/allocation.rst:69
103+
#: ../../c-api/allocation.rst:72
103104
msgid ":c:func:`PyModule_Create`"
104105
msgstr ":c:func:`PyModule_Create`"
105106

106-
#: ../../c-api/allocation.rst:70
107+
#: ../../c-api/allocation.rst:73
107108
msgid "To allocate and create extension modules."
108109
msgstr "分配記憶體和建立擴充模組。"

c-api/apiabiversion.po

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2022-12-18 00:16+0000\n"
11+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1212
"PO-Revision-Date: 2022-01-24 22:34+0800\n"
1313
"Last-Translator: Matt Wang <[email protected]>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -177,8 +177,8 @@ msgid "Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``."
177177
msgstr "使用它進行數值比較,例如 ``#if PY_VERSION_HEX >= ...``。"
178178

179179
#: ../../c-api/apiabiversion.rst:63
180-
msgid "This version is also available via the symbol :data:`Py_Version`."
181-
msgstr "該版本也可透過符號 :data:`Py_Version` 獲得。"
180+
msgid "This version is also available via the symbol :c:var:`Py_Version`."
181+
msgstr "該版本也可透過符號 :c:var:`Py_Version` 獲得。"
182182

183183
#: ../../c-api/apiabiversion.rst:67
184184
msgid ""

c-api/arg.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-07-24 00:03+0000\n"
10+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1111
"PO-Revision-Date: 2022-10-16 03:21+0800\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -824,7 +824,7 @@ msgstr ""
824824
#: ../../c-api/arg.rst:471
825825
msgid ""
826826
"This is an example of the use of this function, taken from the sources for "
827-
"the :mod:`_weakref` helper module for weak references::"
827+
"the :mod:`!_weakref` helper module for weak references::"
828828
msgstr ""
829829

830830
#: ../../c-api/arg.rst:487

c-api/buffer.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-07-24 00:03+0000\n"
10+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:30+0000\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -70,7 +70,7 @@ msgstr ""
7070
msgid ""
7171
"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase."
7272
"write` method of file objects: any object that can export a series of bytes "
73-
"through the buffer interface can be written to a file. While :meth:`write` "
73+
"through the buffer interface can be written to a file. While :meth:`!write` "
7474
"only needs read-only access to the internal contents of the object passed to "
7575
"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write "
7676
"access to the contents of their argument. The buffer interface allows "

c-api/bytes.po

+25-25
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
10+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:04+0000\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -87,8 +87,8 @@ msgid "Comment"
8787
msgstr ""
8888

8989
#: ../../c-api/bytes.rst:67
90-
msgid ":attr:`%%`"
91-
msgstr ":attr:`%%`"
90+
msgid "``%%``"
91+
msgstr "``%%``"
9292

9393
#: ../../c-api/bytes.rst:67
9494
msgid "*n/a*"
@@ -99,8 +99,8 @@ msgid "The literal % character."
9999
msgstr ""
100100

101101
#: ../../c-api/bytes.rst:69
102-
msgid ":attr:`%c`"
103-
msgstr ":attr:`%c`"
102+
msgid "``%c``"
103+
msgstr "``%c``"
104104

105105
#: ../../c-api/bytes.rst:69 ../../c-api/bytes.rst:72 ../../c-api/bytes.rst:90
106106
#: ../../c-api/bytes.rst:93
@@ -112,16 +112,16 @@ msgid "A single byte, represented as a C int."
112112
msgstr ""
113113

114114
#: ../../c-api/bytes.rst:72
115-
msgid ":attr:`%d`"
116-
msgstr ":attr:`%d`"
115+
msgid "``%d``"
116+
msgstr "``%d``"
117117

118118
#: ../../c-api/bytes.rst:72
119119
msgid "Equivalent to ``printf(\"%d\")``. [1]_"
120120
msgstr "等價於 ``printf(\"%d\")``. [1]_"
121121

122122
#: ../../c-api/bytes.rst:75
123-
msgid ":attr:`%u`"
124-
msgstr ":attr:`%u`"
123+
msgid "``%u``"
124+
msgstr "``%u``"
125125

126126
#: ../../c-api/bytes.rst:75
127127
msgid "unsigned int"
@@ -132,8 +132,8 @@ msgid "Equivalent to ``printf(\"%u\")``. [1]_"
132132
msgstr "等價於 ``printf(\"%u\")``. [1]_"
133133

134134
#: ../../c-api/bytes.rst:78
135-
msgid ":attr:`%ld`"
136-
msgstr ":attr:`%ld`"
135+
msgid "``%ld``"
136+
msgstr "``%ld``"
137137

138138
#: ../../c-api/bytes.rst:78
139139
msgid "long"
@@ -144,8 +144,8 @@ msgid "Equivalent to ``printf(\"%ld\")``. [1]_"
144144
msgstr "等價於 ``printf(\"%ld\")``. [1]_"
145145

146146
#: ../../c-api/bytes.rst:81
147-
msgid ":attr:`%lu`"
148-
msgstr ":attr:`%lu`"
147+
msgid "``%lu``"
148+
msgstr "``%lu``"
149149

150150
#: ../../c-api/bytes.rst:81
151151
msgid "unsigned long"
@@ -156,8 +156,8 @@ msgid "Equivalent to ``printf(\"%lu\")``. [1]_"
156156
msgstr "等價於 ``printf(\"%lu\")``. [1]_"
157157

158158
#: ../../c-api/bytes.rst:84
159-
msgid ":attr:`%zd`"
160-
msgstr ":attr:`%zd`"
159+
msgid "``%zd``"
160+
msgstr "``%zd``"
161161

162162
#: ../../c-api/bytes.rst:84
163163
msgid ":c:type:`\\ Py_ssize_t`"
@@ -168,8 +168,8 @@ msgid "Equivalent to ``printf(\"%zd\")``. [1]_"
168168
msgstr "等價於 ``printf(\"%zd\")``. [1]_"
169169

170170
#: ../../c-api/bytes.rst:87
171-
msgid ":attr:`%zu`"
172-
msgstr ":attr:`%zu`"
171+
msgid "``%zu``"
172+
msgstr "``%zu``"
173173

174174
#: ../../c-api/bytes.rst:87
175175
msgid "size_t"
@@ -180,24 +180,24 @@ msgid "Equivalent to ``printf(\"%zu\")``. [1]_"
180180
msgstr "等價於 ``printf(\"%zu\")``. [1]_"
181181

182182
#: ../../c-api/bytes.rst:90
183-
msgid ":attr:`%i`"
184-
msgstr ":attr:`%i`"
183+
msgid "``%i``"
184+
msgstr "``%i``"
185185

186186
#: ../../c-api/bytes.rst:90
187187
msgid "Equivalent to ``printf(\"%i\")``. [1]_"
188188
msgstr "等價於 ``printf(\"%i\")``. [1]_"
189189

190190
#: ../../c-api/bytes.rst:93
191-
msgid ":attr:`%x`"
192-
msgstr ":attr:`%x`"
191+
msgid "``%x``"
192+
msgstr "``%x``"
193193

194194
#: ../../c-api/bytes.rst:93
195195
msgid "Equivalent to ``printf(\"%x\")``. [1]_"
196196
msgstr "等價於 ``printf(\"%x\")``. [1]_"
197197

198198
#: ../../c-api/bytes.rst:96
199-
msgid ":attr:`%s`"
200-
msgstr ":attr:`%s`"
199+
msgid "``%s``"
200+
msgstr "``%s``"
201201

202202
#: ../../c-api/bytes.rst:96
203203
msgid "const char\\*"
@@ -208,8 +208,8 @@ msgid "A null-terminated C character array."
208208
msgstr ""
209209

210210
#: ../../c-api/bytes.rst:99
211-
msgid ":attr:`%p`"
212-
msgstr ":attr:`%p`"
211+
msgid "``%p``"
212+
msgstr "``%p``"
213213

214214
#: ../../c-api/bytes.rst:99
215215
msgid "const void\\*"

c-api/capsule.po

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-05-09 00:15+0000\n"
10+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:30+0000\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -93,7 +93,7 @@ msgstr ""
9393
msgid ""
9494
"The *name* parameter must compare exactly to the name stored in the capsule. "
9595
"If the name stored in the capsule is ``NULL``, the *name* passed in must "
96-
"also be ``NULL``. Python uses the C function :c:func:`strcmp` to compare "
96+
"also be ``NULL``. Python uses the C function :c:func:`!strcmp` to compare "
9797
"capsule names."
9898
msgstr ""
9999

@@ -166,8 +166,8 @@ msgstr ""
166166
#: ../../c-api/capsule.rst:123
167167
msgid ""
168168
"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls "
169-
"to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) "
170-
"are guaranteed to succeed."
169+
"to any of the accessors (any function starting with ``PyCapsule_Get``) are "
170+
"guaranteed to succeed."
171171
msgstr ""
172172

173173
#: ../../c-api/capsule.rst:127

c-api/code.po

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
10+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1111
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
1212
"Last-Translator: Liang-Bo Wang <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -60,7 +60,7 @@ msgstr ""
6060
#: ../../c-api/code.rst:41
6161
msgid ""
6262
"Since the definition of the bytecode changes often, calling :c:func:"
63-
"`PyCode_New` directly can bind you to a precise Python version."
63+
"`PyUnstable_Code_New` directly can bind you to a precise Python version."
6464
msgstr ""
6565

6666
#: ../../c-api/code.rst:44
@@ -82,9 +82,9 @@ msgstr ""
8282

8383
#: ../../c-api/code.rst:61
8484
msgid ""
85-
"Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for "
86-
"positional-only arguments. The same caveats that apply to ``PyCode_New`` "
87-
"also apply to this function."
85+
"Similar to :c:func:`PyUnstable_Code_New`, but with an extra "
86+
"\"posonlyargcount\" for positional-only arguments. The same caveats that "
87+
"apply to ``PyUnstable_Code_New`` also apply to this function."
8888
msgstr ""
8989

9090
#: ../../c-api/code.rst:66

c-api/codec.po

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2021-10-26 16:47+0000\n"
10+
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
1111
"PO-Revision-Date: 2023-07-24 17:51+0000\n"
1212
"Last-Translator: Matt Wang <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -28,10 +28,10 @@ msgstr "註冊一個新的編解碼器搜索函式。"
2828

2929
#: ../../c-api/codec.rst:10
3030
msgid ""
31-
"As side effect, this tries to load the :mod:`encodings` package, if not yet "
31+
"As side effect, this tries to load the :mod:`!encodings` package, if not yet "
3232
"done, to make sure that it is always first in the list of search functions."
3333
msgstr ""
34-
"作為副作用 (side effect),這會嘗試載入 :mod:`encodings`\\ (如果尚未完成),"
34+
"作為副作用 (side effect),這會嘗試載入 :mod:`!encodings`\\ (如果尚未完成),"
3535
"以確保它始終位於搜索函式列表中的第一個。"
3636

3737
#: ../../c-api/codec.rst:15

0 commit comments

Comments
 (0)