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

Commit0b3dad7

Browse files
authored
Merge branch '3.12' into cron/sync/3.12
2 parentsf3d3bcf +09d5136 commit0b3dad7

Some content is hidden

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

51 files changed

+719
-237
lines changed

‎.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Install the pre-commit hooks below with
2+
# 'pre-commit install'
3+
4+
# Auto-update the version of the hooks with
5+
# 'pre-commit autoupdate'
6+
7+
repos:
8+
-repo:https://git.afpy.org/AFPy/powrap
9+
# there's no release tag in repo, use the latest commit hash id instead
10+
rev:a34a9fed116d24562fbe4bb8d456ade85f056c36
11+
hooks:
12+
-id:powrap

‎README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ the PSF for inclusion in the documentation.
8989
brew install gettext
9090
9191
brew link gettext --force
92+
- 安裝 pre-commit 自動在 commit 時檢查 ``.po`` 檔格式。
93+
..code-block::bash
94+
95+
pip install pre-commit
96+
pre-commit install
9297
9398
在進行任何動作以前,你必須在 GitHub 上 fork 此專案(按下右上角的 ``Fork``
9499
按鈕),這樣會把整個專案複製一份到你的 GitHub 帳號底下,你可以對這個 fork

‎c-api/list.po

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2023, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
65
# Nkeys Syu <nkeys1324@gmail.com>, 2016
6+
# Matt Wang <mattwang44@gmail.com>, 2023
77
msgid ""
88
msgstr ""
99
"Project-Id-Version:Python 3.12\n"
1010
"Report-Msgid-Bugs-To:\n"
1111
"POT-Creation-Date:2023-05-09 00:15+0000\n"
12-
"PO-Revision-Date:2023-03-03 20:35+0800\n"
13-
"Last-Translator:Nkeys Syu <nkeys1324@gmail.com>\n"
12+
"PO-Revision-Date:2023-08-24 00:55+0800\n"
13+
"Last-Translator:Matt Wang <mattwang44@gmail.com>\n"
1414
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1515
"tw)\n"
1616
"Language:zh_TW\n"
@@ -26,20 +26,22 @@ msgstr "List(串列)物件"
2626

2727
#:../../c-api/list.rst:13
2828
msgid"This subtype of :c:type:`PyObject` represents a Python list object."
29-
msgstr""
29+
msgstr":c:type:`PyObject` 的這個子型別表示 Python 的 list(串列)物件。"
3030

3131
#:../../c-api/list.rst:18
3232
msgid""
3333
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
3434
"This is the same object as :class:`list` in the Python layer."
3535
msgstr""
36+
"此 :c:type:`PyTypeObject` 實例表示 Python 的 list 型別。這與 Python 層中的 :"
37+
"class:`list` 是同一個物件。"
3638

3739
#:../../c-api/list.rst:24
3840
msgid""
3941
"Return true if *p* is a list object or an instance of a subtype of the list "
4042
"type. This function always succeeds."
4143
msgstr""
42-
"如果 *p* 是一個 list 物件或者是 list型別的子型別的實例,就回傳 true。這個函"
44+
"如果 *p* 是一個 list 物件或者是 list型別之子型別的實例,就回傳 true。這個函"
4345
"式永遠會成功執行。"
4446

4547
#:../../c-api/list.rst:30
@@ -52,7 +54,7 @@ msgstr ""
5254

5355
#:../../c-api/list.rst:36
5456
msgid"Return a new list of length *len* on success, or ``NULL`` on failure."
55-
msgstr""
57+
msgstr"成功時回傳長度為 *len* 的新串列,失敗時回傳 ``NULL``。"
5658

5759
#:../../c-api/list.rst:40
5860
msgid""
@@ -61,12 +63,16 @@ msgid ""
6163
"`PySequence_SetItem` or expose the object to Python code before setting all "
6264
"items to a real object with :c:func:`PyList_SetItem`."
6365
msgstr""
66+
"如果 *len* 大於零,則回傳的串列物件之項目將被設定為 ``NULL``。因此,在使用 :"
67+
"c:func:`PyList_SetItem` 來將所有項目設定為一個真實物件前,你無法使用像是 :c:"
68+
"func:`PySequence_SetItem` 的使用抽象 API 函式,也不能將物件暴露 (expose) 給 "
69+
"Python 程式碼。"
6470

6571
#:../../c-api/list.rst:50
6672
msgid""
6773
"Return the length of the list object in *list*; this is equivalent to "
6874
"``len(list)`` on a list object."
69-
msgstr""
75+
msgstr"回傳 *list* 串列物件的長度;這相當於串列物件的 ``len(list)``。"
7076

7177
#:../../c-api/list.rst:56
7278
msgid"Similar to :c:func:`PyList_Size`, but without error checking."
@@ -79,50 +85,66 @@ msgid ""
7985
"supported. If *index* is out of bounds (<0 or >=len(list)), return ``NULL`` "
8086
"and set an :exc:`IndexError` exception."
8187
msgstr""
88+
"回傳 *list* 指向的串列中位於 *index* 位置的物件。該位置不可為負數;並不支援從"
89+
"串列尾末開始索引。如果 *index* 超出邊界範圍(<0 或 >=len(list))則回傳 "
90+
"``NULL`` 並設定 :exc:`IndexError` 例外。"
8291

8392
#:../../c-api/list.rst:69
8493
msgid"Similar to :c:func:`PyList_GetItem`, but without error checking."
85-
msgstr""
94+
msgstr"與 :c:func:`PyList_GetItem` 類似,但沒有錯誤檢查。"
8695

8796
#:../../c-api/list.rst:74
8897
msgid""
8998
"Set the item at index *index* in list to *item*. Return ``0`` on success. "
9099
"If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` "
91100
"exception."
92101
msgstr""
102+
"將串列中索引 *index* 處的項目設定為 *item*。成功時回傳 ``0``。如果 *index* 超"
103+
"出邊界範圍則回傳 ``-1`` 並設定一個 :exc:`IndexError` 例外。"
93104

94105
#:../../c-api/list.rst:80
95106
msgid""
96107
"This function\"steals\" a reference to *item* and discards a reference to "
97108
"an item already in the list at the affected position."
98109
msgstr""
110+
"此函式「竊取」對 *item* 的參照,並丟棄對串列中受影響位置上已存在項目的參照。"
99111

100112
#:../../c-api/list.rst:86
101113
msgid""
102114
"Macro form of :c:func:`PyList_SetItem` without error checking. This is "
103115
"normally only used to fill in new lists where there is no previous content."
104116
msgstr""
117+
":c:func:`PyList_SetItem` 的巨集形式,沒有錯誤檢查。這通常僅用於填充沒有已存在"
118+
"內容的新串列。"
105119

106120
#:../../c-api/list.rst:91
107121
msgid""
108122
"This macro\"steals\" a reference to *item*, and, unlike :c:func:"
109123
"`PyList_SetItem`, does *not* discard a reference to any item that is being "
110124
"replaced; any reference in *list* at position *i* will be leaked."
111125
msgstr""
126+
"該巨集「竊取」對 *item* 的參照,並且與 :c:func:`PyList_SetItem` 不同的是,它"
127+
"\\ *不會*\\ 丟棄對任意被替換項目的參照;*list* 中位置 *i* 的任何參照都將被洩"
128+
"漏 (leak)。"
112129

113130
#:../../c-api/list.rst:99
114131
msgid""
115132
"Insert the item *item* into list *list* in front of index *index*. Return "
116133
"``0`` if successful; return ``-1`` and set an exception if unsuccessful. "
117134
"Analogous to ``list.insert(index, item)``."
118135
msgstr""
136+
"將項目 *item* 插入串列 *list* 中索引 *index* 的位置之前。如果成功則回傳 "
137+
"``0``;如果失敗則回傳 ``-1`` 並設定例外。類似於 ``list.insert(index, "
138+
"item)``。"
119139

120140
#:../../c-api/list.rst:106
121141
msgid""
122142
"Append the object *item* at the end of list *list*. Return ``0`` if "
123143
"successful; return ``-1`` and set an exception if unsuccessful. Analogous "
124144
"to ``list.append(item)``."
125145
msgstr""
146+
"將物件 *item* 附加到串列 *list* 的最後面。如果成功則回傳 ``0``;如果不成功,"
147+
"則回傳 ``-1`` 並設定例外。類似於 ``list.append(item)``。"
126148

127149
#:../../c-api/list.rst:113
128150
msgid""
@@ -131,6 +153,9 @@ msgid ""
131153
"Analogous to ``list[low:high]``. Indexing from the end of the list is not "
132154
"supported."
133155
msgstr""
156+
"回傳 *list* 中的物件串列,其中包含 *low* 和 *high* *之間*\\ 的物件。如果沒有"
157+
"成功則回傳 ``NULL`` 並設定例外。類似於 ``list[low:high]``。不支援從串列尾末開"
158+
"始索引。"
134159

135160
#:../../c-api/list.rst:120
136161
msgid""
@@ -140,24 +165,34 @@ msgid ""
140165
"Return ``0`` on success, ``-1`` on failure. Indexing from the end of the "
141166
"list is not supported."
142167
msgstr""
168+
"將 *low* 和 *high* 之間的 *list* 切片設定為 *itemlist* 的內容。類似於 "
169+
"``list[low:high] = itemlist``。*itemlist* 可能為 ``NULL``,表示分配一個空串列"
170+
"(切片刪除)。成功時回傳 ``0``,失敗時則回傳 ``-1``。不支援從串列尾末開始索"
171+
"引。"
143172

144173
#:../../c-api/list.rst:129
145174
msgid""
146175
"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on "
147176
"failure. This is equivalent to ``list.sort()``."
148177
msgstr""
178+
"對 *list* 的項目進行原地 (in place) 排序。成功時回傳 ``0``,失敗時回傳 "
179+
"``-1``。這相當於 ``list.sort()``。"
149180

150181
#:../../c-api/list.rst:135
151182
msgid""
152183
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
153184
"failure. This is the equivalent of ``list.reverse()``."
154185
msgstr""
186+
"原地反轉 *list* 的項目。成功時回傳 ``0``,失敗時回傳 ``-1``。這相當於 ``list."
187+
"reverse()``。"
155188

156189
#:../../c-api/list.rst:143
157190
msgid""
158191
"Return a new tuple object containing the contents of *list*; equivalent to "
159192
"``tuple(list)``."
160193
msgstr""
194+
"回傳一個新的 tuple(元組)物件,其中包含 *list* 的內容;相當於 "
195+
"``tuple(list)``。"
161196

162197
#:../../c-api/list.rst:8
163198
msgid"object"

‎faq/design.po

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44
#
55
# Translators:
66
# Ching-Lung Chuang, 2015
7+
# SiriusKoan, 2022
8+
# Steven Hsu <hsuhaochun@gmail.com>, 2023
79
msgid ""
810
msgstr ""
911
"Project-Id-Version:Python 3.12\n"
1012
"Report-Msgid-Bugs-To:\n"
1113
"POT-Creation-Date:2023-08-21 00:03+0000\n"
12-
"PO-Revision-Date:2023-02-18 13:10+0800\n"
13-
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
14+
"PO-Revision-Date:2023-08-31 11:34+0800\n"
15+
"Last-Translator:Steven Hsu <hsuhaochun@gmail.com>\n"
1416
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1517
"tw)\n"
1618
"Language:zh_TW\n"
1719
"MIME-Version:1.0\n"
1820
"Content-Type:text/plain; charset=UTF-8\n"
1921
"Content-Transfer-Encoding:8bit\n"
2022
"Plural-Forms:nplurals=1; plural=0;\n"
21-
"X-Generator:Poedit 3.2.2\n"
23+
"X-Generator:Poedit 3.3.2\n"
2224
"X-Poedit-Bookmarks:-1,-1,-1,-1,-1,93,25,-1,-1,-1\n"
2325

2426
#:../../faq/design.rst:3
@@ -1034,8 +1036,8 @@ msgstr ""
10341036
"就像介面規範一樣,一個適當的測試規則在建造大型又複雜的 Python 應用程式時可以"
10351037
"幫上忙。事實上,他可能可以有更好的表現,因為介面規範無法測試程式的特定屬性。"
10361038
"舉例來說,:meth:`!list.append` 方法應該要在某個內部的串列最後面加上新的元素,"
1037-
"而介面規範沒辦法測試你的 :meth:`!list.append` 是不是真的有正確的實作,但這在測"
1038-
"試套件裡是件很簡單的事。"
1039+
"而介面規範沒辦法測試你的 :meth:`!list.append` 是不是真的有正確的實作,但這在"
1040+
"測試套件裡是件很簡單的事。"
10391041

10401042
#:../../faq/design.rst:592
10411043
msgid""
@@ -1229,6 +1231,9 @@ msgid ""
12291231
"such as using a 'leading dot', have been rejected in favour of explicitness "
12301232
"(see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html)."
12311233
msgstr""
1234+
"類似的提案包括引入語法以進一步減少程式碼量,例如使用「前導點 (leading "
1235+
"dot)」,但這些提案已被捨棄,以維持程式的明確性(參閱 https://mail.python.org/"
1236+
"pipermail/python-ideas/2016-May/040070.html)。"
12321237

12331238
#:../../faq/design.rst:715
12341239
msgid"Why don't generators support the with statement?"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp