2
2
# This file is distributed under the same license as the Python package.
3
3
#
4
4
# Translators:
5
+ # Adrian Liaw <[email protected] >, 2018
6
+ # Kisaragi Hiu <[email protected] >, 2024
5
7
msgid ""
6
8
msgstr ""
7
9
"Project-Id-Version : Python 3.12\n "
8
10
"Report-Msgid-Bugs-To : \n "
9
11
"POT-Creation-Date : 2024-06-27 00:03+0000\n "
10
- "PO-Revision-Date : 2018-05-23 16:17+0000 \n "
11
- "Last-Translator : Adrian Liaw <adrianliaw2000@gmail .com>\n "
12
+ "PO-Revision-Date : 2024-08-06 07:30+0900 \n "
13
+ "Last-Translator : Kisaragi Hiu <mail@kisaragi-hiu .com>\n "
12
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
13
15
"tw)\n "
14
16
"Language : zh_TW\n "
15
17
"MIME-Version : 1.0\n "
16
18
"Content-Type : text/plain; charset=UTF-8\n "
17
19
"Content-Transfer-Encoding : 8bit\n "
18
20
"Plural-Forms : nplurals=1; plural=0;\n "
21
+ "X-Generator : Lokalize 24.04.70\n "
19
22
20
23
#: ../../reference/datamodel.rst:6
21
24
msgid "Data model"
22
25
msgstr "資料模型"
23
26
24
27
#: ../../reference/datamodel.rst:12
25
28
msgid "Objects, values and types"
26
- msgstr ""
29
+ msgstr "物件、數值和型別 "
27
30
28
31
#: ../../reference/datamodel.rst:18
29
32
msgid ""
@@ -32,6 +35,9 @@ msgid ""
32
35
"sense, and in conformance to Von Neumann's model of a \" stored program "
33
36
"computer\" , code is also represented by objects.)"
34
37
msgstr ""
38
+ ":dfn:`物件` 是 Python 為資料的抽象表示方式。一個 Python 程式當中的所有資料皆"
39
+ "由物件或物件之間的關係來呈現。(某種意義上,同時符合 Von Neumann 對於「儲存程"
40
+ "式型電腦」(\" stored program computer\" ) 的模型,程式碼也是以物件呈現的。)"
35
41
36
42
#: ../../reference/datamodel.rst:35
37
43
msgid ""
@@ -41,10 +47,14 @@ msgid ""
41
47
"objects; the :func:`id` function returns an integer representing its "
42
48
"identity."
43
49
msgstr ""
50
+ "每個物件都有一個識別性、型別,和數值。物件的\\ *識別性*\\ 在物件建立後永遠不"
51
+ "會改變;您也可以把它想成是該物件在記憶體中的位址。\\ :keyword:`is` 運算子會比"
52
+ "較兩個物件的識別性是否相同;\\ :func:`id` 函式則會回傳代表一個該物件的識別性"
53
+ "的整數。"
44
54
45
55
#: ../../reference/datamodel.rst:42
46
56
msgid "For CPython, ``id(x)`` is the memory address where ``x`` is stored."
47
- msgstr ""
57
+ msgstr "在 CPython 當中, \\ ``id(x)`` 就是 ``x`` 所儲存在的記憶體位址。 "
48
58
49
59
#: ../../reference/datamodel.rst:44
50
60
msgid ""
@@ -54,6 +64,10 @@ msgid ""
54
64
"an object itself). Like its identity, an object's :dfn:`type` is also "
55
65
"unchangeable. [#]_"
56
66
msgstr ""
67
+ "一個物件的型別決定了該物件所支援的操作(例如「它有長度嗎?」),也同時定義該"
68
+ "型別的物件能夠擁有的數值。\\ :func:`type` 函式會回傳一個物件的型別(而該型別"
69
+ "本身也是一個物件)。如同它的識別性,一個物件的型別 (:dfn:`type`) 也是不可變"
70
+ "的。\\ [#]_"
57
71
58
72
#: ../../reference/datamodel.rst:50
59
73
msgid ""
@@ -68,6 +82,13 @@ msgid ""
68
82
"instance, numbers, strings and tuples are immutable, while dictionaries and "
69
83
"lists are mutable."
70
84
msgstr ""
85
+ "某些物件的\\ *數值*\\ 是可變的。數值可變的物件稱作「可變動」(*mutable*);建立"
86
+ "後數值不可變的物件則稱作「不可變動」(*immutable*)。(不可變的容器物件中如果包"
87
+ "含對於可變物件的參照,則後者的數值改變的時候前者的數值也會跟著一起改變;這種"
88
+ "時候該容器仍會被當成是不可變的,因為它包含的物件集合仍然無法變更。因此可變或"
89
+ "不可變嚴格說起並不等同於數值是否能被改變,它的定義有其他不明顯的細節。)一個"
90
+ "物件是否可變動取決於它的型別;舉例來說,數字、字串和 tuple 是不可變動的,而字"
91
+ "典與串列則是可變動的。"
71
92
72
93
#: ../../reference/datamodel.rst:65
73
94
msgid ""
@@ -77,6 +98,9 @@ msgid ""
77
98
"implementation quality how garbage collection is implemented, as long as no "
78
99
"objects are collected that are still reachable."
79
100
msgstr ""
101
+ "物件永遠不會被明示的摧毀;但當它們變得不再能夠存取的時候可能會被作為垃圾回"
102
+ "收。每個實作都能延後垃圾回收或是乾脆忽略它 --- 垃圾回收如何進行完全是各個實作"
103
+ "自己的事項,唯一擔保是仍然可存取的物件絕不會被回收。"
80
104
81
105
#: ../../reference/datamodel.rst:73
82
106
msgid ""
@@ -89,6 +113,11 @@ msgid ""
89
113
"on immediate finalization of objects when they become unreachable (so you "
90
114
"should always close files explicitly)."
91
115
msgstr ""
116
+ "CPython 目前使用一種參照計數的方案,並提供可選的循環連結垃圾延遲偵測,這個方"
117
+ "案會在大部分物件變得不可存取時馬上回收它們,但不保證能夠回收包含循環參照的垃"
118
+ "圾。關於控制循環垃圾回收的資訊請見 :mod:`gc` 模組的說明文件。其他實作的行為不"
119
+ "會相同,CPython 也有可能改變,因此請不要仰賴物件在變得不可存取時能夠馬上被最"
120
+ "終化(亦即您應該總是明確關閉檔案)。"
92
121
93
122
#: ../../reference/datamodel.rst:82
94
123
msgid ""
@@ -97,6 +126,9 @@ msgid ""
97
126
"catching an exception with a :keyword:`try`...\\ :keyword:`except` statement "
98
127
"may keep objects alive."
99
128
msgstr ""
129
+ "請注意,使用一個實作的追蹤或除錯工具可能會讓原本能夠回收的物件被維持存活。也"
130
+ "請注意,使用 :keyword:`try`...\\ :keyword:`except` 陳述式來抓捕例外也可能會讓"
131
+ "物件維持存活。"
100
132
101
133
#: ../../reference/datamodel.rst:87
102
134
msgid ""
@@ -109,6 +141,11 @@ msgid ""
109
141
"`finally` statement and the :keyword:`with` statement provide convenient "
110
142
"ways to do this."
111
143
msgstr ""
144
+ "某些物件包含對於「外部」資源的參照,像是開啟的檔案或是視窗。基本上這些資源會"
145
+ "在物件被回收時釋放,但因為垃圾回收不保證會發生,這種物件也會提供明確釋放外部"
146
+ "資源的方式 --- 通常是 :meth:`!close` method。強烈建議各個程式明確關閉這種物"
147
+ "件。\\ :keyword:`try`...\\ :keyword:`finally` 陳述式與 :keyword:`with` 陳述式"
148
+ "提供進行明確關閉的方便手段。"
112
149
113
150
#: ../../reference/datamodel.rst:97
114
151
msgid ""
@@ -121,6 +158,11 @@ msgid ""
121
158
"implied. So, if an immutable container (like a tuple) contains a reference "
122
159
"to a mutable object, its value changes if that mutable object is changed."
123
160
msgstr ""
161
+ "某些物件包含對於其他物件的參照;這種物件被叫做「容器」。容器的範例有 tuple、"
162
+ "串列與字典。這些參照是容器的數值的一部分。通常當我們提到容器的數值的時候,我"
163
+ "們指的是其中包含的物件的數值,而不是它們的識別性;但當我們提到容器是否可變的"
164
+ "時候,我們指的是單層包含的物件的識別性。因此,如果一個不可變的容器(像一個 "
165
+ "tuple)包含對於可變物件的參照,該可變物件被變更時該容器的數值也會跟著變更。"
124
166
125
167
#: ../../reference/datamodel.rst:106
126
168
msgid ""
@@ -134,6 +176,13 @@ msgid ""
134
176
"different, unique, newly created empty lists. (Note that ``c = d = []`` "
135
177
"assigns the same object to both ``c`` and ``d``.)"
136
178
msgstr ""
179
+ "型別影響物件行為的幾乎所有面向。就連物件識別性的重要性某種程度上也受型別影"
180
+ "響:對於不可變的型別,計算新數值的操作可能其實會回傳一個某個相同型別且相同數"
181
+ "值的現存物件的參照;對於可變型別這則不會發生。舉例來說,在進行 ``a = 1; b = "
182
+ "1`` 之後,\\ ``a`` 和 ``b`` 可能會參照同一個物件,也可能不會,取決於所使用的"
183
+ "實作;但在進行 ``c = []; d = []`` 之後,\\ ``c`` 和 ``d`` 則保證會參照兩個不"
184
+ "同、獨特、且新建立的空白串列。(請注意,\\ ``c = d = []`` 則會將同一個物件同"
185
+ "時指派給 ``c`` 和 ``d``\\ 。)"
137
186
138
187
#: ../../reference/datamodel.rst:120
139
188
msgid "The standard type hierarchy"
@@ -159,7 +208,7 @@ msgstr ""
159
208
160
209
#: ../../reference/datamodel.rst:146 ../../reference/datamodel.rst:148
161
210
msgid "None"
162
- msgstr ""
211
+ msgstr "None "
163
212
164
213
#: ../../reference/datamodel.rst:150
165
214
msgid ""
@@ -168,6 +217,9 @@ msgid ""
168
217
"signify the absence of a value in many situations, e.g., it is returned from "
169
218
"functions that don't explicitly return anything. Its truth value is false."
170
219
msgstr ""
220
+ "這個型別只有一個數值。只有一個物件有這個數值。這個物件由內建名稱 ``None`` 存"
221
+ "取。它用來在許多情況下代表數值不存在,例如沒有明確回傳任何東西的函式就會回傳"
222
+ "這個物件。它的真值是 false。"
171
223
172
224
#: ../../reference/datamodel.rst:157 ../../reference/datamodel.rst:159
173
225
msgid "NotImplemented"
@@ -182,6 +234,10 @@ msgid ""
182
234
"will then try the reflected operation, or some other fallback, depending on "
183
235
"the operator.) It should not be evaluated in a boolean context."
184
236
msgstr ""
237
+ "這個型別只有一個數值。只有一個物件有這個數值。這個物件由內建名稱 :data:"
238
+ "`NotImplemented` 存取。數字方法和 rich comparison 方法應該在沒有為所提供的運"
239
+ "算元實作該操作的時候回傳這個數值。(直譯器接下來則會依運算子嘗試反轉的操作或"
240
+ "是其他的後備方案。)它不應該在預期布林值的情境中被計算。"
185
241
186
242
#: ../../reference/datamodel.rst:168
187
243
msgid "See :ref:`implementing-the-arithmetic-operations` for more details."
@@ -193,17 +249,22 @@ msgid ""
193
249
"it currently evaluates as true, it will emit a :exc:`DeprecationWarning`. It "
194
250
"will raise a :exc:`TypeError` in a future version of Python."
195
251
msgstr ""
252
+ "在預期布林值的情境中計算 :data:`NotImplemented` 的行為已棄用。雖然目前它會計"
253
+ "算為 true,它也會同時發出 :exc:`DeprecationWarning`\\ 。從某個未來 Python 版"
254
+ "本開始這將會引發 :exc:`TypeError`\\ 。"
196
255
197
256
#: ../../reference/datamodel.rst:179 ../../reference/datamodel.rst:180
198
257
msgid "Ellipsis"
199
- msgstr ""
258
+ msgstr "Ellipsis "
200
259
201
260
#: ../../reference/datamodel.rst:184
202
261
msgid ""
203
262
"This type has a single value. There is a single object with this value. "
204
263
"This object is accessed through the literal ``...`` or the built-in name "
205
264
"``Ellipsis``. Its truth value is true."
206
265
msgstr ""
266
+ "這個型別只有一個數值。只有一個物件有這個數值。這個物件由文本 ``...`` 或內建名"
267
+ "稱 ``Ellipsis`` 存取。它的真值是 true。"
207
268
208
269
#: ../../reference/datamodel.rst:190
209
270
msgid ":class:`numbers.Number`"
@@ -402,7 +463,7 @@ msgstr ""
402
463
403
464
#: ../../reference/datamodel.rst:358
404
465
msgid "Tuples"
405
- msgstr ""
466
+ msgstr "Tuple(元組) "
406
467
407
468
#: ../../reference/datamodel.rst:364
408
469
msgid ""
@@ -416,7 +477,7 @@ msgstr ""
416
477
417
478
#: ../../reference/datamodel.rst:371
418
479
msgid "Bytes"
419
- msgstr ""
480
+ msgstr "位元組 "
420
481
421
482
#: ../../reference/datamodel.rst:374
422
483
msgid ""
@@ -429,7 +490,7 @@ msgstr ""
429
490
430
491
#: ../../reference/datamodel.rst:382
431
492
msgid "Mutable sequences"
432
- msgstr ""
493
+ msgstr "可變序列 "
433
494
434
495
#: ../../reference/datamodel.rst:391
435
496
msgid ""
@@ -461,7 +522,7 @@ msgstr ""
461
522
462
523
#: ../../reference/datamodel.rst:411
463
524
msgid "Byte Arrays"
464
- msgstr ""
525
+ msgstr "位元組陣列 "
465
526
466
527
#: ../../reference/datamodel.rst:414
467
528
msgid ""
@@ -473,7 +534,7 @@ msgstr ""
473
534
474
535
#: ../../reference/datamodel.rst:421
475
536
msgid "Set types"
476
- msgstr ""
537
+ msgstr "Set(集合)型別 "
477
538
478
539
#: ../../reference/datamodel.rst:427
479
540
msgid ""
@@ -499,7 +560,7 @@ msgstr ""
499
560
500
561
#: ../../reference/datamodel.rst:442
501
562
msgid "Sets"
502
- msgstr ""
563
+ msgstr "Set(集合) "
503
564
504
565
#: ../../reference/datamodel.rst:445
505
566
msgid ""
@@ -510,7 +571,7 @@ msgstr ""
510
571
511
572
#: ../../reference/datamodel.rst:450
512
573
msgid "Frozen sets"
513
- msgstr ""
574
+ msgstr "Frozen set(凍結集合) "
514
575
515
576
#: ../../reference/datamodel.rst:453
516
577
msgid ""
@@ -521,7 +582,7 @@ msgstr ""
521
582
522
583
#: ../../reference/datamodel.rst:460
523
584
msgid "Mappings"
524
- msgstr ""
585
+ msgstr "對映 "
525
586
526
587
#: ../../reference/datamodel.rst:467
527
588
msgid ""
@@ -581,7 +642,7 @@ msgstr ""
581
642
582
643
#: ../../reference/datamodel.rst:513
583
644
msgid "Callable types"
584
- msgstr ""
645
+ msgstr "可呼叫型別 "
585
646
586
647
#: ../../reference/datamodel.rst:521
587
648
msgid ""
@@ -611,7 +672,7 @@ msgstr "屬性"
611
672
612
673
#: ../../reference/datamodel.rst:552 ../../reference/datamodel.rst:586
613
674
msgid "Meaning"
614
- msgstr ""
675
+ msgstr "意義 "
615
676
616
677
#: ../../reference/datamodel.rst:555
617
678
msgid ""
@@ -831,7 +892,7 @@ msgstr ""
831
892
832
893
#: ../../reference/datamodel.rst:744
833
894
msgid "Generator functions"
834
- msgstr ""
895
+ msgstr "Generator(產生器)函式 "
835
896
836
897
#: ../../reference/datamodel.rst:750
837
898
msgid ""
@@ -848,7 +909,7 @@ msgstr ""
848
909
849
910
#: ../../reference/datamodel.rst:762
850
911
msgid "Coroutine functions"
851
- msgstr ""
912
+ msgstr "Coroutine(協程)函式 "
852
913
853
914
#: ../../reference/datamodel.rst:767
854
915
msgid ""
@@ -885,7 +946,7 @@ msgstr ""
885
946
886
947
#: ../../reference/datamodel.rst:800
887
948
msgid "Built-in functions"
888
- msgstr ""
949
+ msgstr "內建函式 "
889
950
890
951
#: ../../reference/datamodel.rst:807
891
952
msgid ""
@@ -894,6 +955,9 @@ msgid ""
894
955
"standard built-in module). The number and type of the arguments are "
895
956
"determined by the C function. Special read-only attributes:"
896
957
msgstr ""
958
+ "一個內建函式物件是一個 C 函式的 wrapper。內建函式的範例有 :func:`len` 和 :"
959
+ "func:`math.sin`\\ (\\ :mod:`math` 是一個標準的內建模組)。內建函式的引數數量"
960
+ "與其型別由其包裝的 C 函式所決定。特殊唯讀屬性:"
897
961
898
962
#: ../../reference/datamodel.rst:812
899
963
msgid ""
@@ -1083,7 +1147,7 @@ msgstr ""
1083
1147
1084
1148
#: ../../reference/datamodel.rst:974
1085
1149
msgid "Special attributes:"
1086
- msgstr ""
1150
+ msgstr "特殊屬性: "
1087
1151
1088
1152
#: ../../reference/datamodel.rst:976
1089
1153
msgid ":attr:`~definition.__name__`"
@@ -3464,7 +3528,7 @@ msgstr ""
3464
3528
3465
3529
#: ../../reference/datamodel.rst:3118
3466
3530
msgid "With Statement Context Managers"
3467
- msgstr ""
3531
+ msgstr "With 陳述式的情境管理器 "
3468
3532
3469
3533
#: ../../reference/datamodel.rst:3120
3470
3534
msgid ""
0 commit comments