@@ -8,7 +8,7 @@ msgstr ""
8
8
"Project-Id-Version :Python 3.12\n "
9
9
"Report-Msgid-Bugs-To :\n "
10
10
"POT-Creation-Date :2023-10-11 17:13+0000\n "
11
- "PO-Revision-Date :2024-03-25 21:54 +0800\n "
11
+ "PO-Revision-Date :2024-03-26 21:42 +0800\n "
12
12
"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
@@ -264,29 +264,35 @@ msgid ""
264
264
"keys. *callback* is the same as the parameter of the same name to the :func:"
265
265
"`ref` function."
266
266
msgstr ""
267
+ "傳回一個使用弱參照的 *object* 的代理 (proxy)。這支援在大多數情境中使用代理,"
268
+ "而不需要對弱參照物件明確地取消參照。回傳的物件將具有 ``ProxyType`` 或 "
269
+ "``CallableProxyType`` 型別,具體取決於 *object* 是否為可呼叫物件。無論參照目"
270
+ "標如何,代理物件都不 :term:`hashable`;這避免了與其基本可變物件本質相關的許多"
271
+ "問題,並阻止它們作為字典的鍵被使用。*callback* 與 :func:`ref` 函式的同名參數"
272
+ "是相同的。"
267
273
268
274
#: ../../library/weakref.rst:149
269
275
msgid ""
270
276
"Accessing an attribute of the proxy object after the referent is garbage "
271
277
"collected raises :exc:`ReferenceError`."
272
- msgstr ""
278
+ msgstr "在參照目標被垃圾回收後存取代理物件的屬性會引發 :exc:`ReferenceError`。 "
273
279
274
280
#: ../../library/weakref.rst:152
275
281
msgid ""
276
282
"Extended the operator support on proxy objects to include the matrix "
277
283
"multiplication operators ``@`` and ``@=``."
278
- msgstr ""
284
+ msgstr "提供對代理物件的運算子支援,以包括矩陣乘法運算子 ``@`` 和 ``@=``。 "
279
285
280
286
#: ../../library/weakref.rst:159
281
287
msgid ""
282
288
"Return the number of weak references and proxies which refer to *object*."
283
- msgstr ""
289
+ msgstr "回傳參照 *object* 的弱參照和代理的數量。 "
284
290
285
291
#: ../../library/weakref.rst:164
286
292
msgid ""
287
293
"Return a list of all weak reference and proxy objects which refer to "
288
294
"*object*."
289
- msgstr ""
295
+ msgstr "回傳參照 *object* 的所有弱參照和代理物件的一個串列。 "
290
296
291
297
#: ../../library/weakref.rst:169
292
298
msgid ""
@@ -296,6 +302,9 @@ msgid ""
296
302
"of an application without adding attributes to those objects. This can be "
297
303
"especially useful with objects that override attribute accesses."
298
304
msgstr ""
305
+ "弱參照鍵的對映類別。當不再有對鍵的強參照時,字典中的條目將被丟棄。這可用於將"
306
+ "附加資料與應用程式其他部分擁有的物件相關聯,而無需向這些物件新增屬性。這對於"
307
+ "覆蓋屬性存取的物件特別有用。"
299
308
300
309
#: ../../library/weakref.rst:175
301
310
msgid ""
@@ -304,10 +313,13 @@ msgid ""
304
313
"not replace the existing key. Due to this, when the reference to the "
305
314
"original key is deleted, it also deletes the entry in the dictionary::"
306
315
msgstr ""
316
+ "請注意,當將與現有鍵具有相同值的鍵(但識別性不相等)插入字典時,它會替換該"
317
+ "值,但不會替換現有鍵。因此,當刪除對原始鍵的參照時,它也會刪除字典中的條"
318
+ "目: ::"
307
319
308
320
#: ../../library/weakref.rst:188
309
321
msgid "A workaround would be to remove the key prior to reassignment::"
310
- msgstr ""
322
+ msgstr "解決方法是在重新賦值 (reassignment) 之前刪除鍵: :: "
311
323
312
324
#: ../../library/weakref.rst:199
313
325
msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`."
@@ -322,37 +334,44 @@ msgid ""
322
334
"references that will cause the garbage collector to keep the keys around "
323
335
"longer than needed."
324
336
msgstr ""
337
+ ":class:`WeakKeyDictionary` 物件有一個直接公開內部參照的附加方法。參照在被使用"
338
+ "時不保證是\" 存活的\" ,因此在使用之前需要檢查呼叫參照的結果。這可以用來防止建"
339
+ "立會導致垃圾回收器保留鍵的時間超過其所需時間的參照。"
325
340
326
341
#: ../../library/weakref.rst:212
327
342
msgid "Return an iterable of the weak references to the keys."
328
- msgstr ""
343
+ msgstr "傳回對鍵的弱參照的可疊代物件。 "
329
344
330
345
#: ../../library/weakref.rst:217
331
346
msgid ""
332
347
"Mapping class that references values weakly. Entries in the dictionary will "
333
348
"be discarded when no strong reference to the value exists any more."
334
- msgstr ""
349
+ msgstr "弱參照值的對映類別。當不再存在對值的強參照時,字典中的條目將被丟棄。 "
335
350
336
351
#: ../../library/weakref.rst:220
337
352
msgid ""
338
353
"Added support for ``|`` and ``|=`` operators, as specified in :pep:`584`."
339
- msgstr ""
354
+ msgstr "新增對 ``|`` 和 ``|=`` 運算子的支持,如 :pep:`584` 中所說明。 "
340
355
341
356
#: ../../library/weakref.rst:223
342
357
msgid ""
343
358
":class:`WeakValueDictionary` objects have an additional method that has the "
344
359
"same issues as the :meth:`WeakKeyDictionary.keyrefs` method."
345
360
msgstr ""
361
+ ":class:`WeakValueDictionary` 物件有一個附加方法,它與 :meth:"
362
+ "`WeakKeyDictionary.keyrefs` 方法有相同的問題。"
346
363
347
364
#: ../../library/weakref.rst:229
348
365
msgid "Return an iterable of the weak references to the values."
349
- msgstr ""
366
+ msgstr "傳回對值的弱參照的可疊代物件。 "
350
367
351
368
#: ../../library/weakref.rst:234
352
369
msgid ""
353
370
"Set class that keeps weak references to its elements. An element will be "
354
371
"discarded when no strong reference to it exists any more."
355
372
msgstr ""
373
+ "保留對其元素的弱參照的集合類別。當不再存在對某個元素的強參照時,該元素將被丟"
374
+ "棄。"
356
375
357
376
#: ../../library/weakref.rst:240
358
377
msgid ""
@@ -362,12 +381,16 @@ msgid ""
362
381
"hold of it. :class:`WeakMethod` has special code to recreate the bound "
363
382
"method until either the object or the original function dies::"
364
383
msgstr ""
384
+ "一個特製的 :class:`ref` 子類別,其模擬對繫結函式 (bound method ) (即在類別上"
385
+ "定義並在實例上查找的方法)的弱參照。由於繫結函式是短暫存在的,因此標準弱參照"
386
+ "無法保留它。:class:`WeakMethod` 有特殊的程式碼來重新建立繫結函式,直到物件或"
387
+ "原始函式死亡: ::"
365
388
366
389
#: ../../library/weakref.rst:264
367
390
msgid ""
368
391
"*callback* is the same as the parameter of the same name to the :func:`ref` "
369
392
"function."
370
- msgstr ""
393
+ msgstr "*callback* 與 :func:`ref` 函式的同名參數是相同的。 "
371
394
372
395
#: ../../library/weakref.rst:270
373
396
msgid ""