1
- # SOME DESCRIPTIVE TITLE.
2
1
# Copyright (C) 2001-2022, Python Software Foundation
3
2
# This file is distributed under the same license as the Python package.
4
3
#
5
4
# Translators:
5
+ # Adrian Liaw <adrianliaw2000@gmail.com>, 2018
6
+ # Matt Wang <mattwang44@gmail.com>, 2022
6
7
msgid ""
7
8
msgstr ""
8
9
"Project-Id-Version : Python 3.10\n "
9
10
"Report-Msgid-Bugs-To : \n "
10
11
"POT-Creation-Date : 2021-11-15 00:09+0000\n "
11
- "PO-Revision-Date : 2018-05-23 14:41+0000 \n "
12
- "Last-Translator : Adrian Liaw <adrianliaw2000 @gmail.com>\n "
12
+ "PO-Revision-Date : 2022-01-20 18:49+0800 \n "
13
+ "Last-Translator : Matt Wang <mattwang44 @gmail.com>\n "
13
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
15
"tw)\n "
15
16
"Language : zh_TW\n "
16
17
"MIME-Version : 1.0\n "
17
18
"Content-Type : text/plain; charset=UTF-8\n "
18
19
"Content-Transfer-Encoding : 8bit\n "
19
20
"Plural-Forms : nplurals=1; plural=0;\n "
21
+ "X-Generator : Poedit 3.0.1\n "
20
22
21
23
#: ../../library/copy.rst:2
22
24
msgid ":mod:`copy` --- Shallow and deep copy operations"
23
- msgstr ""
25
+ msgstr ":mod:`copy` --- 淺層 (shallow) 和深層 (deep) 複製操作 "
24
26
25
27
#: ../../library/copy.rst:7
26
28
msgid "**Source code:** :source:`Lib/copy.py`"
@@ -34,75 +36,87 @@ msgid ""
34
36
"changing the other. This module provides generic shallow and deep copy "
35
37
"operations (explained below)."
36
38
msgstr ""
39
+ "Python 的賦值陳述式不複製物件,而是建立目標和物件的繫結 (binding) 關係。對於"
40
+ "可變 (mutable) 或包含可變項目 (mutable item) 的集合,有時會需要一份副本來改變"
41
+ "特定副本,而不必改變其他副本。本模組提供了通用的淺層複製和深層複製操作(如下"
42
+ "所述)。"
37
43
38
44
#: ../../library/copy.rst:18
39
45
msgid "Interface summary:"
40
- msgstr ""
46
+ msgstr "介面摘要: "
41
47
42
48
#: ../../library/copy.rst:22
43
49
msgid "Return a shallow copy of *x*."
44
- msgstr ""
50
+ msgstr "回傳 *x* 的淺層複製。 "
45
51
46
52
#: ../../library/copy.rst:27
47
53
msgid "Return a deep copy of *x*."
48
- msgstr ""
54
+ msgstr "回傳 *x* 的深層複製。 "
49
55
50
56
#: ../../library/copy.rst:32
51
57
msgid "Raised for module specific errors."
52
- msgstr ""
58
+ msgstr "引發針對特定模組的錯誤。 "
53
59
54
60
#: ../../library/copy.rst:36
55
61
msgid ""
56
62
"The difference between shallow and deep copying is only relevant for "
57
63
"compound objects (objects that contain other objects, like lists or class "
58
64
"instances):"
59
65
msgstr ""
66
+ "淺層與深層複製的區別僅與複合物件(即包含 list 或類別的實例等其他物件的物件)"
67
+ "相關:"
60
68
61
69
#: ../../library/copy.rst:39
62
70
msgid ""
63
71
"A *shallow copy* constructs a new compound object and then (to the extent "
64
72
"possible) inserts *references* into it to the objects found in the original."
65
73
msgstr ""
74
+ "*淺層複製*\\ 建構一個新的複合物件,然後(在儘可能的範圍內)將原始物件中找到的"
75
+ "物件的\\ *參照*\\ 插入其中。"
66
76
67
77
#: ../../library/copy.rst:42
68
78
msgid ""
69
79
"A *deep copy* constructs a new compound object and then, recursively, "
70
80
"inserts *copies* into it of the objects found in the original."
71
81
msgstr ""
82
+ "*深層複製*\\ 建構一個新的複合物件,然後遞迴地將在原始物件裡找到的物件的\\ *副"
83
+ "本*\\ 插入其中。"
72
84
73
85
#: ../../library/copy.rst:45
74
86
msgid ""
75
87
"Two problems often exist with deep copy operations that don't exist with "
76
88
"shallow copy operations:"
77
- msgstr ""
89
+ msgstr "深層複製操作通常存在兩個問題,而淺層複製操作並不存在這些問題: "
78
90
79
91
#: ../../library/copy.rst:48
80
92
msgid ""
81
93
"Recursive objects (compound objects that, directly or indirectly, contain a "
82
94
"reference to themselves) may cause a recursive loop."
83
- msgstr ""
95
+ msgstr "遞迴物件(直接或間接包含對自身參照的複合物件)可能會導致遞迴迴圈。 "
84
96
85
97
#: ../../library/copy.rst:51
86
98
msgid ""
87
99
"Because deep copy copies everything it may copy too much, such as data which "
88
100
"is intended to be shared between copies."
89
101
msgstr ""
102
+ "由於深層複製會複製所有內容,因此可能會有過多複製(例如應該在副本之間共享的資"
103
+ "料)。"
90
104
91
105
#: ../../library/copy.rst:54
92
106
msgid "The :func:`deepcopy` function avoids these problems by:"
93
- msgstr ""
107
+ msgstr ":func:`deepcopy` 函式用以下方式避免了這些問題: "
94
108
95
109
#: ../../library/copy.rst:56
96
110
msgid ""
97
111
"keeping a ``memo`` dictionary of objects already copied during the current "
98
112
"copying pass; and"
99
- msgstr ""
113
+ msgstr "保留在當前複製過程中已複製的物件的 ``memo`` 字典;以及 "
100
114
101
115
#: ../../library/copy.rst:59
102
116
msgid ""
103
117
"letting user-defined classes override the copying operation or the set of "
104
118
"components copied."
105
- msgstr ""
119
+ msgstr "允許使用者定義的類別複寫 (override) 複製操作或複製的元件集合。 "
106
120
107
121
#: ../../library/copy.rst:62
108
122
msgid ""
@@ -112,13 +126,19 @@ msgid ""
112
126
"unchanged; this is compatible with the way these are treated by the :mod:"
113
127
"`pickle` module."
114
128
msgstr ""
129
+ "該模組不複製模組、方法、堆疊追蹤(stack trace)、堆疊框(stack frame)、檔"
130
+ "案、socket、視窗、陣列以及任何類似的型別。它透過不變更原始物件並將其回傳來"
131
+ "(淺層或深層地)\" 複製\" 函式和類別;這與 :mod:`pickle` 模組處理這類問題的方式"
132
+ "是相似的。"
115
133
116
134
#: ../../library/copy.rst:67
117
135
msgid ""
118
136
"Shallow copies of dictionaries can be made using :meth:`dict.copy`, and of "
119
137
"lists by assigning a slice of the entire list, for example, ``copied_list = "
120
138
"original_list[:]``."
121
139
msgstr ""
140
+ "字典的淺層複製可以使用 :meth:`dict.copy`\\ ,而 list 的淺層複製可以透過賦值整"
141
+ "個 list 的切片 (slice) 完成,例如,``copied_list = original_list[:]``\\ 。"
122
142
123
143
#: ../../library/copy.rst:73
124
144
msgid ""
@@ -127,6 +147,9 @@ msgid ""
127
147
"information on these methods. In fact, the :mod:`copy` module uses the "
128
148
"registered pickle functions from the :mod:`copyreg` module."
129
149
msgstr ""
150
+ "類別可以使用與操作 pickle 相同的介面來控制複製操作,關於這些方法的描述資"
151
+ "訊請參考 :mod:`pickle` 模組。實際上,:mod:`copy` 模組使用的正是從 :mod:"
152
+ "`copyreg` 模組中註冊的 pickle 函式。"
130
153
131
154
#: ../../library/copy.rst:82
132
155
msgid ""
@@ -140,6 +163,12 @@ msgid ""
140
163
"dictionary as second argument. The memo dictionary should be treated as an "
141
164
"opaque object."
142
165
msgstr ""
166
+ "想要為一個類別定義它自己的複製操作實作,可以透過定義特殊方法 :meth:"
167
+ "`__copy__` 和 :meth:`__deepcopy__`\\ 。呼叫前者以實現淺層複製操作;不必傳入額"
168
+ "外引數。呼叫後者以實現深層複製操作;它應傳入一個引數,即 ``memo`` 字典。如"
169
+ "果 :meth:`__deepcopy__` 實現需要建立一個元件的深層複製,它應當呼叫 :func:"
170
+ "`deepcopy` 函式並以該元件作為第一個引數、以該 memo 字典作為第二個引數。memo "
171
+ "字典應當被當作不透明物件 (opaque object) 來處理。"
143
172
144
173
#: ../../library/copy.rst:95
145
174
msgid "Module :mod:`pickle`"
@@ -150,3 +179,5 @@ msgid ""
150
179
"Discussion of the special methods used to support object state retrieval and "
151
180
"restoration."
152
181
msgstr ""
182
+ "支援物件之狀態檢索 (state retrieval) 和恢復 (restoration) 相關特殊方法的討"
183
+ "論。"
0 commit comments