Skip to content

Commit 0890e04

Browse files
Sync with CPython 3.12 (#769)
1 parent 1f9240b commit 0890e04

13 files changed

+1121
-1089
lines changed

c-api/bytes.po

+8-8
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-08-09 00:03+0000\n"
10+
"POT-Creation-Date: 2023-12-26 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-"
@@ -272,17 +272,17 @@ msgstr ""
272272
#: ../../c-api/bytes.rst:156
273273
msgid ""
274274
"Return the null-terminated contents of the object *obj* through the output "
275-
"variables *buffer* and *length*."
275+
"variables *buffer* and *length*. Returns ``0`` on success."
276276
msgstr ""
277277

278-
#: ../../c-api/bytes.rst:159
278+
#: ../../c-api/bytes.rst:160
279279
msgid ""
280280
"If *length* is ``NULL``, the bytes object may not contain embedded null "
281281
"bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is "
282282
"raised."
283283
msgstr ""
284284

285-
#: ../../c-api/bytes.rst:163
285+
#: ../../c-api/bytes.rst:164
286286
msgid ""
287287
"The buffer refers to an internal buffer of *obj*, which includes an "
288288
"additional null byte at the end (not counted in *length*). The data must "
@@ -292,13 +292,13 @@ msgid ""
292292
"returns ``-1`` and raises :exc:`TypeError`."
293293
msgstr ""
294294

295-
#: ../../c-api/bytes.rst:170
295+
#: ../../c-api/bytes.rst:171
296296
msgid ""
297297
"Previously, :exc:`TypeError` was raised when embedded null bytes were "
298298
"encountered in the bytes object."
299299
msgstr ""
300300

301-
#: ../../c-api/bytes.rst:177
301+
#: ../../c-api/bytes.rst:178
302302
msgid ""
303303
"Create a new bytes object in *\\*bytes* containing the contents of *newpart* "
304304
"appended to *bytes*; the caller will own the new reference. The reference "
@@ -307,14 +307,14 @@ msgid ""
307307
"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set."
308308
msgstr ""
309309

310-
#: ../../c-api/bytes.rst:186
310+
#: ../../c-api/bytes.rst:187
311311
msgid ""
312312
"Create a new bytes object in *\\*bytes* containing the contents of *newpart* "
313313
"appended to *bytes*. This version releases the :term:`strong reference` to "
314314
"*newpart* (i.e. decrements its reference count)."
315315
msgstr ""
316316

317-
#: ../../c-api/bytes.rst:193
317+
#: ../../c-api/bytes.rst:194
318318
msgid ""
319319
"A way to resize a bytes object even though it is \"immutable\". Only use "
320320
"this to build up a brand new bytes object; don't use this if the bytes may "

howto/isolating-extensions.po

+5-5
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: 2023-11-17 00:03+0000\n"
11+
"POT-Creation-Date: 2023-12-27 00:03+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -439,7 +439,7 @@ msgstr ""
439439
#: ../../howto/isolating-extensions.rst:339
440440
msgid ""
441441
"Define a traverse function using ``Py_tp_traverse``, which visits the type "
442-
"(e.g. using :c:expr:`Py_VISIT(Py_TYPE(self))`)."
442+
"(e.g. using ``Py_VISIT(Py_TYPE(self))``)."
443443
msgstr ""
444444

445445
#: ../../howto/isolating-extensions.rst:342
@@ -617,9 +617,9 @@ msgstr ""
617617

618618
#: ../../howto/isolating-extensions.rst:485
619619
msgid ""
620-
"Do not confuse the defining class with :c:expr:`Py_TYPE(self)`. If the "
621-
"method is called on a *subclass* of your type, ``Py_TYPE(self)`` will refer "
622-
"to that subclass, which may be defined in different module than yours."
620+
"Do not confuse the defining class with ``Py_TYPE(self)``. If the method is "
621+
"called on a *subclass* of your type, ``Py_TYPE(self)`` will refer to that "
622+
"subclass, which may be defined in different module than yours."
623623
msgstr ""
624624

625625
#: ../../howto/isolating-extensions.rst:490

library/bisect.po

+17-25
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
14+
"POT-Creation-Date: 2023-12-27 00:03+0000\n"
1515
"PO-Revision-Date: 2023-08-01 12:53+0800\n"
1616
"Last-Translator: Matt Wang <[email protected]>\n"
1717
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -47,15 +47,15 @@ msgid ""
4747
"The module is called :mod:`bisect` because it uses a basic bisection "
4848
"algorithm to do its work. Unlike other bisection tools that search for a "
4949
"specific value, the functions in this module are designed to locate an "
50-
"insertion point. Accordingly, the functions never call an :meth:`__eq__` "
51-
"method to determine whether a value has been found. Instead, the functions "
52-
"only call the :meth:`__lt__` method and will return an insertion point "
53-
"between values in an array."
50+
"insertion point. Accordingly, the functions never call an :meth:`~object."
51+
"__eq__` method to determine whether a value has been found. Instead, the "
52+
"functions only call the :meth:`~object.__lt__` method and will return an "
53+
"insertion point between values in an array."
5454
msgstr ""
5555
"這個模組被稱為 :mod:`bisect` 是因為它使用基本二分演算法來完成其工作。不像其它"
5656
"搜尋特定值的二分法工具,本模組中的函式旨在定位插入點。因此,這些函式永遠不會"
57-
"呼叫 :meth:`__eq__` 方法來確認是否找到一個值。相反地,這些函式只呼叫 :meth:"
58-
"`__lt__` 方法,並在陣列中的值回傳一個插入點。"
57+
"呼叫 :meth:`~object.__eq__` 方法來確認是否找到一個值。相反地,這些函式只呼"
58+
"叫 :meth:`~object.__lt__` 方法,並在陣列中的值回傳一個插入點。"
5959

6060
#: ../../library/bisect.rst:29
6161
msgid "The following functions are provided:"
@@ -133,11 +133,11 @@ msgstr "將元素 *x* 插入 list *a*,並維持順序。"
133133
#: ../../library/bisect.rst:75
134134
msgid ""
135135
"This function first runs :py:func:`~bisect.bisect_left` to locate an "
136-
"insertion point. Next, it runs the :meth:`insert` method on *a* to insert "
136+
"insertion point. Next, it runs the :meth:`!insert` method on *a* to insert "
137137
"*x* at the appropriate position to maintain sort order."
138138
msgstr ""
139-
"此函式先使用 :py:func:`~bisect.bisect_left` 搜索插入位置,接著用 :meth:"
140-
"`insert` 於 *a* 以將 *x* 插入,並維持添加元素後的順序。"
139+
"此函式先使用 :py:func:`~bisect.bisect_left` 搜索插入位置,接著用 :meth:`!"
140+
"insert` 於 *a* 以將 *x* 插入,並維持添加元素後的順序。"
141141

142142
#: ../../library/bisect.rst:79 ../../library/bisect.rst:99
143143
msgid ""
@@ -163,11 +163,11 @@ msgstr ""
163163
#: ../../library/bisect.rst:95
164164
msgid ""
165165
"This function first runs :py:func:`~bisect.bisect_right` to locate an "
166-
"insertion point. Next, it runs the :meth:`insert` method on *a* to insert "
166+
"insertion point. Next, it runs the :meth:`!insert` method on *a* to insert "
167167
"*x* at the appropriate position to maintain sort order."
168168
msgstr ""
169-
"此函式先使用 :py:func:`~bisect.bisect_right` 搜索插入位置,接著用 :meth:"
170-
"`insert` 於 *a* 以將 *x* 插入,並維持添加元素後的順序。"
169+
"此函式先使用 :py:func:`~bisect.bisect_right` 搜索插入位置,接著用 :meth:`!"
170+
"insert` 於 *a* 以將 *x* 插入,並維持添加元素後的順序。"
171171

172172
#: ../../library/bisect.rst:110
173173
msgid "Performance Notes"
@@ -247,9 +247,7 @@ msgid ""
247247
"sorted lists::"
248248
msgstr ""
249249
"上面的 `bisect functions`_ 在找到數值插入點上很有用,但一般的數值搜尋任務上就"
250-
"不是那麼的方便。以下的五個函式展示了如何將其轉換成標準的有序列表查找函式:\n"
251-
"\n"
252-
"::"
250+
"不是那麼的方便。以下的五個函式展示了如何將其轉換成標準的有序列表查找函式: ::"
253251

254252
#: ../../library/bisect.rst:187
255253
msgid "Examples"
@@ -264,9 +262,7 @@ msgid ""
264262
msgstr ""
265263
":py:func:`~bisect.bisect` 函式可用於數值表中的查找 (numeric table lookup),這"
266264
"個範例使用 :py:func:`~bisect.bisect` 以基於一組有序的數值分界點來為一個考試成"
267-
"績找到相對應的字母等級:90 以上是 'A'、80 到 89 為 'B',依此類推:\n"
268-
"\n"
269-
"::"
265+
"績找到相對應的字母等級:90 以上是 'A'、80 到 89 為 'B',依此類推: ::"
270266

271267
#: ../../library/bisect.rst:203
272268
msgid ""
@@ -276,16 +272,12 @@ msgid ""
276272
msgstr ""
277273
":py:func:`~bisect.bisect` 與 :py:func:`~bisect.insort` 函式也適用於內容為 "
278274
"tuples(元組)的 lists,*key* 引數可被用以取出在數值表中作為排序依據的欄"
279-
"位:\n"
280-
"\n"
281-
"::"
275+
"位: ::"
282276

283277
#: ../../library/bisect.rst:237
284278
msgid ""
285279
"If the key function is expensive, it is possible to avoid repeated function "
286280
"calls by searching a list of precomputed keys to find the index of a record::"
287281
msgstr ""
288282
"如果鍵函式會消耗較多運算資源,那可以在預先計算好的鍵列表中搜索該紀錄的索引"
289-
"值,以減少重複的函式呼叫:\n"
290-
"\n"
291-
"::"
283+
"值,以減少重複的函式呼叫: ::"

0 commit comments

Comments
 (0)