@@ -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-05-17 00:33 +0800\n "
11
+ "PO-Revision-Date :2024-05-22 20:58 +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 "
@@ -112,7 +112,7 @@ msgid ""
112
112
msgstr ""
113
113
":class:`finalize` 提供了一種直接的方法來註冊在物件被垃圾回收時呼叫的清理函"
114
114
"式。這比在原始弱參照上設定回呼函式更容易使用,因為模組在物件被回收前會自動確"
115
- "保最終化函式 (finalizer) 保持存活。"
115
+ "保最終化器 (finalizer) 保持存活。"
116
116
117
117
#: ../../library/weakref.rst:63
118
118
msgid ""
@@ -188,7 +188,7 @@ msgid ""
188
188
"passed as the only parameter to the callback; the referent will no longer be "
189
189
"available."
190
190
msgstr ""
191
- "傳回對 *object* 的弱參照。如果參照目標仍存活,則可以透過呼叫參照物件來取回原"
191
+ "回傳對 *object* 的弱參照。如果參照目標仍存活,則可以透過呼叫參照物件來取回原"
192
192
"始物件;如果參照目標已不存活,呼叫參照物件將導致 :const:`None` 被回傳。如果 "
193
193
"*callback* 被提供而非 :const:`None`,且回傳的弱參照物件仍存活,那麼當物件即將"
194
194
"被最終化 (finalize) 時,回呼將被呼叫;弱參照物件將作為唯一的參數傳遞給回呼;"
@@ -264,7 +264,7 @@ 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)。這支援在大多數情境中使用代理,"
267
+ "回傳一個使用弱參照的 *object* 的代理 (proxy)。這支援在大多數情境中使用代理,"
268
268
"而不需要對弱參照物件明確地取消參照。回傳的物件將具有 ``ProxyType`` 或 "
269
269
"``CallableProxyType`` 型別,具體取決於 *object* 是否為可呼叫物件。無論參照目"
270
270
"標如何,代理物件都不是 :term:`hashable`;這避免了與其基本可變物件本質相關的許"
@@ -340,7 +340,7 @@ msgstr ""
340
340
341
341
#: ../../library/weakref.rst:212
342
342
msgid "Return an iterable of the weak references to the keys."
343
- msgstr "傳回對鍵的弱參照的可疊代物件 。"
343
+ msgstr "回傳對鍵的弱參照的可疊代物件 。"
344
344
345
345
#: ../../library/weakref.rst:217
346
346
msgid ""
@@ -363,7 +363,7 @@ msgstr ""
363
363
364
364
#: ../../library/weakref.rst:229
365
365
msgid "Return an iterable of the weak references to the values."
366
- msgstr "傳回對值的弱參照的可疊代物件 。"
366
+ msgstr "回傳對值的弱參照的可疊代物件 。"
367
367
368
368
#: ../../library/weakref.rst:234
369
369
msgid ""
@@ -399,9 +399,9 @@ msgid ""
399
399
"always survive until the reference object is collected, greatly simplifying "
400
400
"lifecycle management."
401
401
msgstr ""
402
- "傳回可呼叫的最終化函式物件 ,此物件在 *obj* 被垃圾回收時會被呼叫。與一般的弱參 "
403
- "照不同,最終化函式將始終存在 ,直到參照物件被回收為止,從而大大簡化了生命週期 "
404
- "管理 。"
402
+ "回傳可呼叫的最終化器物件 ,此物件在 *obj* 被垃圾回收時會被呼叫。與一般的弱參照 "
403
+ "不同,最終化器將始終存在 ,直到參照物件被回收為止,從而大大簡化了生命週期管 "
404
+ "理 。"
405
405
406
406
#: ../../library/weakref.rst:275
407
407
msgid ""
@@ -410,9 +410,9 @@ msgid ""
410
410
"finalizer returns the result of evaluating ``func(*arg, **kwargs)``, whereas "
411
411
"calling a dead finalizer returns :const:`None`."
412
412
msgstr ""
413
- "最終化函式在被呼叫 (明確呼叫或在垃圾回收時)之前被視為\\ *存活*,之後它就會"
414
- "\\ * 死亡*。呼叫存活的最終化函式會回傳 ``func(*arg, **kwargs)`` 的計算結果,而 "
415
- "呼叫死亡的最終化函式會回傳 :const:`None`。"
413
+ "最終化器在被呼叫 (明確呼叫或在垃圾回收時)之前被視為\\ *存活*,之後它就會\\ * "
414
+ "死亡*。呼叫存活的最終化器會回傳 ``func(*arg, **kwargs)`` 的計算結果,而呼叫死 "
415
+ "亡的最終化器會回傳 :const:`None`。"
416
416
417
417
#: ../../library/weakref.rst:280
418
418
msgid ""
@@ -421,26 +421,25 @@ msgid ""
421
421
"handled in the same way as exceptions raised from an object's :meth:`~object."
422
422
"__del__` method or a weak reference's callback."
423
423
msgstr ""
424
- "垃圾回收期間最終化函式回呼引發的例外會在標準錯誤輸出中顯示,但無法傳播。它們"
425
- "的處理方式與從物件的 :meth:`~object.__del__` 方法或弱參照的回呼引發的例外相"
426
- "同。"
424
+ "垃圾回收期間最終化器回呼引發的例外會在標準錯誤輸出中顯示,但無法傳播。它們的"
425
+ "處理方式與從物件的 :meth:`~object.__del__` 方法或弱參照的回呼引發的例外相同。"
427
426
428
427
#: ../../library/weakref.rst:286
429
428
msgid ""
430
429
"When the program exits, each remaining live finalizer is called unless its :"
431
430
"attr:`atexit` attribute has been set to false. They are called in reverse "
432
431
"order of creation."
433
432
msgstr ""
434
- "當程式結束時,除非該最終化函式的 :attr:`atexit` 屬性已被設定為 false,否則每 "
435
- "個存活的最終化函式會被呼叫 。它們以與建立相反的順序被呼叫。"
433
+ "當程式結束時,除非該最終化器的 :attr:`atexit` 屬性已被設定為 false,否則每個 "
434
+ "存活的最終化器會被呼叫 。它們以與建立相反的順序被呼叫。"
436
435
437
436
#: ../../library/weakref.rst:290
438
437
msgid ""
439
438
"A finalizer will never invoke its callback during the later part of the :"
440
439
"term:`interpreter shutdown` when module globals are liable to have been "
441
440
"replaced by :const:`None`."
442
441
msgstr ""
443
- "當模組的 globals 可能被 :const:`None` 取代時,最終化函式永遠不會在 :term:"
442
+ "當模組的 globals 可能被 :const:`None` 取代時,最終化器永遠不會在 :term:"
444
443
"`interpreter shutdown` 的後期調用(invoke)其回呼。"
445
444
446
445
#: ../../library/weakref.rst:296
@@ -469,7 +468,7 @@ msgstr ""
469
468
470
469
#: ../../library/weakref.rst:313
471
470
msgid "Property which is true if the finalizer is alive, false otherwise."
472
- msgstr "如果最終化函式仍存活 ,則屬性為 true,否則為 false。"
471
+ msgstr "如果最終化器仍存活 ,則屬性為 true,否則為 false。"
473
472
474
473
#: ../../library/weakref.rst:317
475
474
msgid ""
@@ -478,7 +477,7 @@ msgid ""
478
477
"true. They are called in reverse order of creation."
479
478
msgstr ""
480
479
"一個可寫的布林屬性,預設為 true。當程式結束時,它會呼叫 :attr:`.atexit` 為 "
481
- "true的所有剩餘且仍存活的最終化函式 。它們以與建立相反的順序被呼叫。"
480
+ "true的所有剩餘且仍存活的最終化器 。它們以與建立相反的順序被呼叫。"
482
481
483
482
#: ../../library/weakref.rst:324
484
483
msgid ""
@@ -600,31 +599,31 @@ msgstr ""
600
599
601
600
#: ../../library/weakref.rst:465
602
601
msgid "Finalizer Objects"
603
- msgstr "最終化函式物件 "
602
+ msgstr "最終化器物件 "
604
603
605
604
#: ../../library/weakref.rst:467
606
605
msgid ""
607
606
"The main benefit of using :class:`finalize` is that it makes it simple to "
608
607
"register a callback without needing to preserve the returned finalizer "
609
608
"object. For instance"
610
609
msgstr ""
611
- "使用 :class:`finalize` 的最大優點是可以輕鬆註冊回呼,而無需保留回傳的最終化函 "
612
- "式物件 。例如"
610
+ "使用 :class:`finalize` 的最大優點是可以輕鬆註冊回呼,而無需保留回傳的最終化器 "
611
+ "物件 。例如"
613
612
614
613
#: ../../library/weakref.rst:481
615
614
msgid ""
616
615
"The finalizer can be called directly as well. However the finalizer will "
617
616
"invoke the callback at most once."
618
- msgstr "最終化函式也可以直接被呼叫 。然而,最終化函式最多會調用回乎一次 。"
617
+ msgstr "最終化器也可以直接被呼叫 。然而,最終化器最多會調用回乎一次 。"
619
618
620
619
#: ../../library/weakref.rst:497
621
620
msgid ""
622
621
"You can unregister a finalizer using its :meth:`~finalize.detach` method. "
623
622
"This kills the finalizer and returns the arguments passed to the constructor "
624
623
"when it was created."
625
624
msgstr ""
626
- "你可以使用最終化函式的 :meth:`~finalize.detach`方法來取消註冊最終化函式。這 "
627
- "會殺死最終化函式並回傳建立建構函式時傳遞給建構函式的引數 。"
625
+ "你可以使用最終化器的 :meth:`~finalize.detach`方法來取消註冊最終化器。這會殺 "
626
+ "死最終化器並回傳建立建構函式時傳遞給建構函式的引數 。"
628
627
629
628
#: ../../library/weakref.rst:511
630
629
msgid ""
@@ -633,11 +632,11 @@ msgid ""
633
632
"instance"
634
633
msgstr ""
635
634
"除非你將 :attr:`~finalize.atexit` 屬性設為 :const:`False`,否則當程式結束時,"
636
- "最終化函式將會被呼叫如果其仍然存在 。例如"
635
+ "最終化器將會被呼叫如果其仍然存在 。例如"
637
636
638
637
#: ../../library/weakref.rst:526
639
638
msgid "Comparing finalizers with :meth:`~object.__del__` methods"
640
- msgstr "最終化函式與 :meth:`~object.__del__` 方法的比較"
639
+ msgstr "最終化器與 :meth:`~object.__del__` 方法的比較"
641
640
642
641
#: ../../library/weakref.rst:528
643
642
msgid ""
@@ -693,26 +692,26 @@ msgid ""
693
692
"the specific functions and objects that it needs, rather than having access "
694
693
"to the full state of the object::"
695
694
msgstr ""
696
- "更耐用的替代方案可以是定義一個最終化函式 ,其僅參照需要的特定函式和物件,而不 "
697
- "是存取物件的完整狀態 : ::"
695
+ "更耐用的替代方案可以是定義一個最終化器 ,其僅參照需要的特定函式和物件,而不是 "
696
+ "存取物件的完整狀態 : ::"
698
697
699
698
#: ../../library/weakref.rst:580
700
699
msgid ""
701
700
"Defined like this, our finalizer only receives a reference to the details it "
702
701
"needs to clean up the directory appropriately. If the object never gets "
703
702
"garbage collected the finalizer will still be called at exit."
704
703
msgstr ""
705
- "定義如下,我們的最終化函式僅接收對適當清理目錄所需的詳細資訊的參照。如果物件 "
706
- "從未被垃圾回收,則最終化函式仍將在結束時被呼叫 。"
704
+ "定義如下,我們的最終化器僅接收對適當清理目錄所需的詳細資訊的參照。如果物件從 "
705
+ "未被垃圾回收,則最終化器仍將在結束時被呼叫 。"
707
706
708
707
#: ../../library/weakref.rst:584
709
708
msgid ""
710
709
"The other advantage of weakref based finalizers is that they can be used to "
711
710
"register finalizers for classes where the definition is controlled by a "
712
711
"third party, such as running code when a module is unloaded::"
713
712
msgstr ""
714
- "基於 weakref的最終化函式的另一個優點是它們可用於為定義由第三方控制的類別註冊 "
715
- "最終化函式 ,例如在卸載模組時執行程式碼: ::"
713
+ "基於 weakref的最終化器的另一個優點是它們可用於為定義由第三方控制的類別註冊最 "
714
+ "終化器 ,例如在卸載模組時執行程式碼: ::"
716
715
717
716
#: ../../library/weakref.rst:596
718
717
msgid ""
@@ -721,6 +720,6 @@ msgid ""
721
720
"at exit. However, in a daemonic thread :func:`atexit.register`, ``try: ... "
722
721
"finally: ...`` and ``with: ...`` do not guarantee that cleanup occurs either."
723
722
msgstr ""
724
- "如果在程式結束時在常駐的 (daemonic)執行緒中建立最終化函式物件,則最終化函式 "
725
- "有可能在結束時不會被呼叫 。然而,在常駐的執行緒中 :func:`atexit.register`、"
723
+ "如果在程式結束時在常駐的 (daemonic)執行緒中建立最終化器物件,則最終化器有可 "
724
+ "能在結束時不會被呼叫 。然而,在常駐的執行緒中 :func:`atexit.register`、"
726
725
"``try: ... finally: ...`` 和 ``with: ...`` 也不保證清理會發生。"