1- # SOME DESCRIPTIVE TITLE.
21# Copyright (C) 2001-2022, Python Software Foundation
32# This file is distributed under the same license as the Python package.
43#
54# Translators:
5+ # Adrian Liaw <adrianliaw2000@gmail.com>, 2018
6+ # Matt Wang <mattwang44@gmail.com>, 2022
67msgid ""
78msgstr ""
89"Project-Id-Version :Python 3.10\n "
910"Report-Msgid-Bugs-To :\n "
1011"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:44+0800 \n "
13+ "Last-Translator :Matt Wang <mattwang44 @gmail.com>\n "
1314"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1415"tw)\n "
1516"Language :zh_TW\n "
1617"MIME-Version :1.0\n "
1718"Content-Type :text/plain; charset=UTF-8\n "
1819"Content-Transfer-Encoding :8bit\n "
1920"Plural-Forms :nplurals=1; plural=0;\n "
21+ "X-Generator :Poedit 3.0.1\n "
2022
2123#: ../../library/copy.rst:2
2224msgid ":mod:`copy` --- Shallow and deep copy operations"
23- msgstr ""
25+ msgstr ":mod:`copy` --- 淺層 (shallow) 和深層 (deep) 複製操作 "
2426
2527#: ../../library/copy.rst:7
2628msgid "**Source code:** :source:`Lib/copy.py`"
@@ -34,75 +36,87 @@ msgid ""
3436"changing the other. This module provides generic shallow and deep copy "
3537"operations (explained below)."
3638msgstr ""
39+ "Python 的賦值陳述式不複製物件,而是建立目標和物件的繫結 (binding) 關係。對於"
40+ "可變 (mutable) 或包含可變項目 (mutable item) 的集合,有時會需要一份副本來改變"
41+ "特定副本,而不必改變其他副本。本模組提供了通用的淺層複製和深層複製操作(如下"
42+ "所述)。"
3743
3844#: ../../library/copy.rst:18
3945msgid "Interface summary:"
40- msgstr ""
46+ msgstr "介面摘要: "
4147
4248#: ../../library/copy.rst:22
4349msgid "Return a shallow copy of *x*."
44- msgstr ""
50+ msgstr "回傳 *x* 的淺層複製。 "
4551
4652#: ../../library/copy.rst:27
4753msgid "Return a deep copy of *x*."
48- msgstr ""
54+ msgstr "回傳 *x* 的深層複製。 "
4955
5056#: ../../library/copy.rst:32
5157msgid "Raised for module specific errors."
52- msgstr ""
58+ msgstr "引發針對特定模組的錯誤。 "
5359
5460#: ../../library/copy.rst:36
5561msgid ""
5662"The difference between shallow and deep copying is only relevant for "
5763"compound objects (objects that contain other objects, like lists or class "
5864"instances):"
5965msgstr ""
66+ "淺層與深層複製的區別僅與複合物件(即包含 list 或類別的實例等其他物件的物件)"
67+ "相關:"
6068
6169#: ../../library/copy.rst:39
6270msgid ""
6371"A *shallow copy* constructs a new compound object and then (to the extent "
6472"possible) inserts *references* into it to the objects found in the original."
6573msgstr ""
74+ "*淺層複製*\\ 建構一個新的複合物件,然後(在儘可能的範圍內)將原始物件中找到的"
75+ "物件的\\ *參照*\\ 插入其中。"
6676
6777#: ../../library/copy.rst:42
6878msgid ""
6979"A *deep copy* constructs a new compound object and then, recursively, "
7080"inserts *copies* into it of the objects found in the original."
7181msgstr ""
82+ "*深層複製*\\ 建構一個新的複合物件,然後遞迴地將在原始物件裡找到的物件的\\ *副本"
83+ "*\\ 插入其中。"
7284
7385#: ../../library/copy.rst:45
7486msgid ""
7587"Two problems often exist with deep copy operations that don't exist with "
7688"shallow copy operations:"
77- msgstr ""
89+ msgstr "深層複製操作通常存在兩個問題,而淺層複製操作並不存在這些問題: "
7890
7991#: ../../library/copy.rst:48
8092msgid ""
8193"Recursive objects (compound objects that, directly or indirectly, contain a "
8294"reference to themselves) may cause a recursive loop."
83- msgstr ""
95+ msgstr "遞迴物件(直接或間接包含對自身參照的複合物件)可能會導致遞迴迴圈。 "
8496
8597#: ../../library/copy.rst:51
8698msgid ""
8799"Because deep copy copies everything it may copy too much, such as data which "
88100"is intended to be shared between copies."
89101msgstr ""
102+ "由於深層複製會複製所有內容,因此可能會有過多複製(例如應該在副本之間共享的資"
103+ "料)。"
90104
91105#: ../../library/copy.rst:54
92106msgid "The :func:`deepcopy` function avoids these problems by:"
93- msgstr ""
107+ msgstr ":func:`deepcopy` 函式用以下方式避免了這些問題: "
94108
95109#: ../../library/copy.rst:56
96110msgid ""
97111"keeping a ``memo`` dictionary of objects already copied during the current "
98112"copying pass; and"
99- msgstr ""
113+ msgstr "保留在當前複製過程中已複製的物件的 ``memo`` 字典;以及 "
100114
101115#: ../../library/copy.rst:59
102116msgid ""
103117"letting user-defined classes override the copying operation or the set of "
104118"components copied."
105- msgstr ""
119+ msgstr "允許使用者定義的類別複寫 (override) 複製操作或複製的元件集合。 "
106120
107121#: ../../library/copy.rst:62
108122msgid ""
@@ -112,13 +126,19 @@ msgid ""
112126"unchanged; this is compatible with the way these are treated by the :mod:"
113127"`pickle` module."
114128msgstr ""
129+ "該模組不複製模組、方法、堆疊追蹤(stack trace)、堆疊幀(stack frame)、檔"
130+ "案、socket、視窗、陣列以及任何類似的型別。它透過不變更原始物件並將其回傳來"
131+ "(淺層或深層地)\" 複製\" 函式和類別;這與 :mod:`pickle` 模組處理這類問題的方式"
132+ "是相似的。"
115133
116134#: ../../library/copy.rst:67
117135msgid ""
118136"Shallow copies of dictionaries can be made using :meth:`dict.copy`, and of "
119137"lists by assigning a slice of the entire list, for example, ``copied_list = "
120138"original_list[:]``."
121139msgstr ""
140+ "字典的淺層複製可以使用 :meth:`dict.copy`\\ ,而 list 的淺層複製可以透過賦值整"
141+ "個 list 的切片 (slice) 完成,例如,``copied_list = original_list[:]``\\ 。"
122142
123143#: ../../library/copy.rst:73
124144msgid ""
@@ -127,6 +147,9 @@ msgid ""
127147"information on these methods. In fact, the :mod:`copy` module uses the "
128148"registered pickle functions from the :mod:`copyreg` module."
129149msgstr ""
150+ "類別可以使用與控制 pickle 操作相同的介面來控制複製操作,關於這些方法的描述資"
151+ "訊請參考 :mod:`pickle` 模組。實際上,:mod:`copy` 模組使用的正是從 :mod:"
152+ "`copyreg` 模組中註冊的 pickle 函式。"
130153
131154#: ../../library/copy.rst:82
132155msgid ""
@@ -140,6 +163,12 @@ msgid ""
140163"dictionary as second argument. The memo dictionary should be treated as an "
141164"opaque object."
142165msgstr ""
166+ "想要為一個類別定義它自己的複製操作實作,可以透過定義特殊方法 :meth:"
167+ "`__copy__` 和 :meth:`__deepcopy__`\\ 。呼叫前者以實現淺層複製操作;不必傳入額"
168+ "外引數。呼叫後者以實現深層複製操作;它應傳入一個引數,即 ``memo`` 字典。如"
169+ "果 :meth:`__deepcopy__` 實現需要建立一個元件的深層複製,它應當呼叫 :func:"
170+ "`deepcopy` 函式並以該元件作為第一個引數、以該 memo 字典作為第二個引數。memo "
171+ "字典應當被當作不透明物件 (opaque object) 來處理。"
143172
144173#: ../../library/copy.rst:95
145174msgid "Module :mod:`pickle`"
@@ -150,3 +179,5 @@ msgid ""
150179"Discussion of the special methods used to support object state retrieval and "
151180"restoration."
152181msgstr ""
182+ "支援物件之狀態檢索 (state retrieval) 和恢復 (restoration) 相關特殊方法的討"
183+ "論。"