Skip to content

Commit c63067c

Browse files
committed
feat: to rst:357
1 parent 2501ea7 commit c63067c

File tree

1 file changed

+36
-11
lines changed

1 file changed

+36
-11
lines changed

library/weakref.po

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2023-10-11 17:13+0000\n"
11-
"PO-Revision-Date: 2024-05-08 22:24+0800\n"
11+
"PO-Revision-Date: 2024-05-14 21:09+0800\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
@@ -17,7 +17,7 @@ msgstr ""
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=1; plural=0;\n"
20-
"X-Generator: Poedit 3.4.1\n"
20+
"X-Generator: Poedit 3.4.4\n"
2121

2222
#: ../../library/weakref.rst:4
2323
msgid ":mod:`weakref` --- Weak references"
@@ -112,7 +112,7 @@ msgid ""
112112
msgstr ""
113113
":class:`finalize` 提供了一種直接的方法來註冊在物件被垃圾回收時呼叫的清理函"
114114
"式。這比在原始弱參照上設定回呼函式更容易使用,因為模組在物件被收集前會自動確"
115-
"保終結函式 (finalizer) 保持存活。"
115+
"保最終化函式 (finalizer) 保持存活。"
116116

117117
#: ../../library/weakref.rst:63
118118
msgid ""
@@ -191,8 +191,8 @@ msgstr ""
191191
"傳回對 *object* 的弱參照。如果參照目標仍存活,則可以透過呼叫參照物件來取回原"
192192
"始物件;如果參照目標已不存活,呼叫參照物件將導致 :const:`None` 被回傳。如果 "
193193
"*callback* 被提供而非 :const:`None`,且回傳的弱參照物件仍存活,那麼當物件即將"
194-
"被終結 (finalize) 時,回呼將被呼叫;弱參照物件將作為唯一的參數傳遞給回呼;"
195-
"照物件將不再可用。"
194+
"被最終化 (finalize) 時,回呼將被呼叫;弱參照物件將作為唯一的參數傳遞給回呼;"
195+
"參照物件將不再可用。"
196196

197197
#: ../../library/weakref.rst:108
198198
msgid ""
@@ -399,6 +399,9 @@ msgid ""
399399
"always survive until the reference object is collected, greatly simplifying "
400400
"lifecycle management."
401401
msgstr ""
402+
"傳回可呼叫的最終化函式物件,此物件在 *obj* 被垃圾回收時會被呼叫。與一般的弱參"
403+
"照不同,最終化函式將始終存在,直到參照物件被回收為止,從而大大簡化了生命週期"
404+
"管理。"
402405

403406
#: ../../library/weakref.rst:275
404407
msgid ""
@@ -407,6 +410,9 @@ msgid ""
407410
"finalizer returns the result of evaluating ``func(*arg, **kwargs)``, whereas "
408411
"calling a dead finalizer returns :const:`None`."
409412
msgstr ""
413+
"最終化函式在被呼叫(明確呼叫或在垃圾收集時)之前被視為\\ *存活*,之後它就會"
414+
"\\ *死亡*。呼叫存活的最終化函式會回傳 ``func(*arg, **kwargs)`` 的計算結果,而"
415+
"呼叫死亡的最終化函式會回傳 :const:`None`。"
410416

411417
#: ../../library/weakref.rst:280
412418
msgid ""
@@ -415,49 +421,64 @@ msgid ""
415421
"handled in the same way as exceptions raised from an object's :meth:`~object."
416422
"__del__` method or a weak reference's callback."
417423
msgstr ""
424+
"垃圾回收期間最終化函式回呼引發的例外會在標準錯誤輸出中顯示,但無法傳播。它們"
425+
"的處理方式與從物件的 :meth:`~object.__del__` 方法或弱參照的回呼引發的例外相"
426+
"同。"
418427

419428
#: ../../library/weakref.rst:286
420429
msgid ""
421430
"When the program exits, each remaining live finalizer is called unless its :"
422431
"attr:`atexit` attribute has been set to false. They are called in reverse "
423432
"order of creation."
424433
msgstr ""
434+
"當程式退出時,除非該最終化函式的 :attr:`atexit` 屬性已被設定為 false,否則每"
435+
"個存活的最終化函式會被呼叫。它們以與建立相反的順序被呼叫。"
425436

426437
#: ../../library/weakref.rst:290
427438
msgid ""
428439
"A finalizer will never invoke its callback during the later part of the :"
429440
"term:`interpreter shutdown` when module globals are liable to have been "
430441
"replaced by :const:`None`."
431442
msgstr ""
443+
"當模組的 globals 可能被 :const:`None` 取代時,最終化函式永遠不會在 :term:"
444+
"`interpreter shutdown` 的後期調用(invoke)其回呼。"
432445

433446
#: ../../library/weakref.rst:296
434447
msgid ""
435448
"If *self* is alive then mark it as dead and return the result of calling "
436449
"``func(*args, **kwargs)``. If *self* is dead then return :const:`None`."
437450
msgstr ""
451+
"如果 *self* 仍存活,則將其標記為死亡並回傳呼叫 ``func(*args, **kwargs)`` 的結"
452+
"果。如果 *self* 已死亡,則回傳 :const:`None`。"
438453

439454
#: ../../library/weakref.rst:302
440455
msgid ""
441456
"If *self* is alive then mark it as dead and return the tuple ``(obj, func, "
442457
"args, kwargs)``. If *self* is dead then return :const:`None`."
443458
msgstr ""
459+
"如果 *self* 仍存活,則將其標記為死亡並回傳元組 ``(obj, func, args, "
460+
"kwargs)``。如果 *self* 已死亡,則回傳 :const:`None`。"
444461

445462
#: ../../library/weakref.rst:308
446463
msgid ""
447464
"If *self* is alive then return the tuple ``(obj, func, args, kwargs)``. If "
448465
"*self* is dead then return :const:`None`."
449466
msgstr ""
467+
"如果 *self* 仍存活,則回傳元組 ``(obj, func, args, kwargs)``。如果 *self* 已"
468+
"死亡,則回傳 :const:`None`。"
450469

451470
#: ../../library/weakref.rst:313
452471
msgid "Property which is true if the finalizer is alive, false otherwise."
453-
msgstr ""
472+
msgstr "如果最終化函式仍存活,則屬性為 true,否則為 false。"
454473

455474
#: ../../library/weakref.rst:317
456475
msgid ""
457476
"A writable boolean property which by default is true. When the program "
458477
"exits, it calls all remaining live finalizers for which :attr:`.atexit` is "
459478
"true. They are called in reverse order of creation."
460479
msgstr ""
480+
"一個可寫的布林屬性,預設為 true。當程式退出時,它會呼叫 :attr:`.atexit` 為 "
481+
"true 的所有剩餘且仍存活的最終化函式。它們以與建立相反的順序被呼叫。"
461482

462483
#: ../../library/weakref.rst:324
463484
msgid ""
@@ -466,35 +487,39 @@ msgid ""
466487
"will never be garbage collected. In particular, *func* should not be a "
467488
"bound method of *obj*."
468489
msgstr ""
490+
"確保 *func*、*args* 和 *kwargs* 不直接或間接擁有對 *obj* 的任何參照非常重要,"
491+
"否則 *obj* 將永遠不會被垃圾回收。尤其 *func* 不應該是 *obj* 的繫結方法。"
469492

470493
#: ../../library/weakref.rst:334
471494
msgid "The type object for weak references objects."
472-
msgstr ""
495+
msgstr "弱參照物件的型別物件。"
473496

474497
#: ../../library/weakref.rst:339
475498
msgid "The type object for proxies of objects which are not callable."
476-
msgstr ""
499+
msgstr "非可呼叫物件的代理的型別物件。"
477500

478501
#: ../../library/weakref.rst:344
479502
msgid "The type object for proxies of callable objects."
480-
msgstr ""
503+
msgstr "可呼叫物件的代理的型別物件。"
481504

482505
#: ../../library/weakref.rst:349
483506
msgid ""
484507
"Sequence containing all the type objects for proxies. This can make it "
485508
"simpler to test if an object is a proxy without being dependent on naming "
486509
"both proxy types."
487510
msgstr ""
511+
"包含代理的所有型別物件的序列。這可以讓測試物件是否為代理變得更簡單,而無需依"
512+
"賴命名兩種代理型別。"
488513

489514
#: ../../library/weakref.rst:356
490515
msgid ":pep:`205` - Weak References"
491-
msgstr ""
516+
msgstr ":pep:`205` - 弱參照"
492517

493518
#: ../../library/weakref.rst:357
494519
msgid ""
495520
"The proposal and rationale for this feature, including links to earlier "
496521
"implementations and information about similar features in other languages."
497-
msgstr ""
522+
msgstr "此功能的提案和理由,包括早期實作的連結以及其他語言中類似功能的資訊。"
498523

499524
#: ../../library/weakref.rst:364
500525
msgid "Weak Reference Objects"

0 commit comments

Comments
 (0)