From 865188bef3252e33f20d5bd0d1ea7a02c48eaf5b Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Thu, 20 Jan 2022 17:56:33 +0800 Subject: [PATCH 1/2] translate `library/gc.po` --- library/gc.po | 147 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 121 insertions(+), 26 deletions(-) diff --git a/library/gc.po b/library/gc.po index 4a147b3986..8126b5ed72 100644 --- a/library/gc.po +++ b/library/gc.po @@ -3,13 +3,16 @@ # This file is distributed under the same license as the Python package. # # Translators: +# Liang-Bo Wang , 2015 +# Matt Wang , 2022 +# msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-31 08:13+0000\n" -"PO-Revision-Date: 2015-12-09 17:51+0000\n" -"Last-Translator: Liang-Bo Wang \n" +"PO-Revision-Date: 2022-06-12 15:31+0800\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -17,10 +20,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.1\n" #: ../../library/gc.rst:2 msgid ":mod:`gc` --- Garbage Collector interface" -msgstr "" +msgstr ":mod:`gc` --- 垃圾回收器介面 (Garbage Collector interface)" #: ../../library/gc.rst:12 msgid "" @@ -35,22 +39,29 @@ msgid "" "this includes ``gc.DEBUG_SAVEALL``, causing garbage-collected objects to be " "saved in gc.garbage for inspection." msgstr "" +"此 module(模組)提供可選的垃圾回收器介面,提供的功能包括:關閉回收器、調整回" +"收頻率、設定偵錯選項。它同時提供對回收器有找到但是無法釋放的不可達物件 " +"(unreachable object) 的存取。由於 Python 使用了帶有參照計數的回收器,如果你確" +"定你的程式不會產生參照迴圈 (reference cycle),你可以關閉回收器。可以透過呼叫 " +"``gc.disable()`` 關閉自動垃圾回收。若要偵錯一個存在記憶體流失 (leak) 的程式," +"請呼叫 ``gc.set_debug(gc.DEBUG_LEAK)``;需要注意的是,它包含 ``gc." +"DEBUG_SAVEALL``,使得被回收的物件會被存放在 gc.garbage 中以待檢查。" #: ../../library/gc.rst:23 msgid "The :mod:`gc` module provides the following functions:" -msgstr "" +msgstr ":mod:`gc` module 提供下列函式:" #: ../../library/gc.rst:28 msgid "Enable automatic garbage collection." -msgstr "" +msgstr "啟用自動垃圾回收。" #: ../../library/gc.rst:33 msgid "Disable automatic garbage collection." -msgstr "" +msgstr "停用自動垃圾回收。" #: ../../library/gc.rst:38 msgid "Return ``True`` if automatic collection is enabled." -msgstr "" +msgstr "如果啟用了自動回收則回傳 ``True``。" #: ../../library/gc.rst:43 msgid "" @@ -59,6 +70,9 @@ msgid "" "0 to 2). A :exc:`ValueError` is raised if the generation number is " "invalid. The number of unreachable objects found is returned." msgstr "" +"若被呼叫時沒有引數,則啟動完整垃圾回收。可選的引數 *generation* 可以是一個指" +"明需要回收哪一代垃圾的整數(從 0 到 2 )。當引數 *generation* 無效時,會引" +"發 :exc:`ValueError` 例外。發現的不可達物件數目會被回傳。" #: ../../library/gc.rst:48 msgid "" @@ -67,6 +81,9 @@ msgid "" "run. Not all items in some free lists may be freed due to the particular " "implementation, in particular :class:`float`." msgstr "" +"每當執行完整回收或最高代 (2) 回收時,為多個內建型別所維護的空閒列表會被清空。" +"為了特定型別的實現,特別是 :class:`float`,在某些空閒列表中並非所有項目都會被" +"釋放。" #: ../../library/gc.rst:56 msgid "" @@ -74,10 +91,12 @@ msgid "" "written to ``sys.stderr``. See below for a list of debugging flags which " "can be combined using bit operations to control debugging." msgstr "" +"設定垃圾回收器的偵錯旗標。偵錯資訊會被寫入 ``sys.stderr``。請見下方的偵錯旗標" +"列表,可以使用位元操作 (bit operation) 進行設定以控制偵錯程式。" #: ../../library/gc.rst:63 msgid "Return the debugging flags currently set." -msgstr "" +msgstr "回傳當前設置的偵錯旗標。" #: ../../library/gc.rst:68 msgid "" @@ -85,16 +104,20 @@ msgid "" "returned. If *generation* is not None, return only the objects tracked by " "the collector that are in that generation." msgstr "" +"回傳一個包含回收器正在追蹤的所有物件的 list,除去所回傳的 list。如果 " +"*generation* 不為 None,只回傳回收器正在追蹤且屬於該代的物件。" #: ../../library/gc.rst:72 msgid "New *generation* parameter." -msgstr "" +msgstr "新增 *generation* 參數。" #: ../../library/gc.rst:8 msgid "" "Raises an :ref:`auditing event ` ``gc.get_objects`` with argument " "``generation``." msgstr "" +"引發一個附帶引數 ``generation`` 的\\ :ref:`稽核事件 (auditing event) " +"` ``gc.get_objects``。" #: ../../library/gc.rst:79 msgid "" @@ -102,16 +125,19 @@ msgid "" "statistics since interpreter start. The number of keys may change in the " "future, but currently each dictionary will contain the following items:" msgstr "" +"回傳一個包含三個字典物件的 list,每個字典分別包含對應代中自從直譯器開始執行後" +"的垃圾回收統計資料。字典的鍵的數目在將來可能會改變,但目前每個字典包含以下項" +"目:" #: ../../library/gc.rst:84 msgid "``collections`` is the number of times this generation was collected;" -msgstr "" +msgstr "``collections`` 是該代被回收的次數;" #: ../../library/gc.rst:86 msgid "" "``collected`` is the total number of objects collected inside this " "generation;" -msgstr "" +msgstr "``collected`` 是該代中被回收的物件總數;" #: ../../library/gc.rst:89 msgid "" @@ -119,12 +145,14 @@ msgid "" "uncollectable (and were therefore moved to the :data:`garbage` list) inside " "this generation." msgstr "" +"``uncollectable`` 是在這一代中被發現無法回收的物件總數(因此被移到 :data:" +"`garbage` list 中)。" #: ../../library/gc.rst:98 msgid "" "Set the garbage collection thresholds (the collection frequency). Setting " "*threshold0* to zero disables collection." -msgstr "" +msgstr "設定垃圾回收閾值(回收頻率)。 將 *threshold0* 設為零會停止回收。" #: ../../library/gc.rst:101 msgid "" @@ -144,18 +172,28 @@ msgid "" "org/garbage_collector/#collecting-the-oldest-generation>`_ for more " "information." msgstr "" +"垃圾回收器會根據物件在多少次垃圾回收後仍倖存來把所有物件分類為三代。新建物件" +"會被放在最年輕代(第 ``0`` 代)。 如果一個物件在一次垃圾回收後倖存,它會被移" +"入下一個較老代。由於第 ``2`` 代是最老代,這一代的物件在一次垃圾回收後仍會保留" +"原樣。為了確定何時要執行,垃圾回收器會追蹤自上一次回收後物件分配和釋放的數" +"量。當分配數量減去釋放數量的結果大於 *threshold0* 時,垃圾回收就會開始。初始" +"時只有第 ``0`` 代會被檢查。如果自第 ``1`` 代被檢查後第 ``0`` 代已被檢查超過 " +"*threshold1* 次,則第 ``1`` 代也會被檢查。對於第三代來說,情況還會更復雜一" +"些,請參閱 `Collecting the oldest generation `_ 來了解詳情。" #: ../../library/gc.rst:118 msgid "" "Return the current collection counts as a tuple of ``(count0, count1, " "count2)``." -msgstr "" +msgstr "將當前回收計數以 ``(count0, count1, count2)`` 形式的 tuple 回傳。" #: ../../library/gc.rst:124 msgid "" "Return the current collection thresholds as a tuple of ``(threshold0, " "threshold1, threshold2)``." msgstr "" +"將當前回收閾值以 ``(threshold0, threshold1, threshold2)`` 形式的 tuple 回傳。" #: ../../library/gc.rst:130 msgid "" @@ -164,6 +202,8 @@ msgid "" "extension types which do refer to other objects but do not support garbage " "collection will not be found." msgstr "" +"回傳包含直接參照 objs 中任一個物件的物件 list。這個函式只定位支援垃圾回收的容" +"器;參照了其它物件但不支援垃圾回收的擴充套件型別無法被找到。" #: ../../library/gc.rst:135 msgid "" @@ -172,6 +212,9 @@ msgid "" "listed among the resulting referrers. To get only currently live objects, " "call :func:`collect` before calling :func:`get_referrers`." msgstr "" +"需要注意的是,已經解除參照的物件,但仍存在於參照迴圈中未被回收時,該物件仍然" +"會被作為參照者出現在回傳的 list 中。若只要獲取當前正在參照的物件,需要在呼" +"叫 :func:`get_referrers` 之前呼叫 :func:`collect`。" #: ../../library/gc.rst:141 msgid "" @@ -180,12 +223,17 @@ msgid "" "temporarily invalid state. Avoid using :func:`get_referrers` for any purpose " "other than debugging." msgstr "" +"在使用 :func:`get_referrers` 回傳的物件時必須要小心,因為其中的一些物件可能仍" +"在建構中而處於暫時無效的狀態。不要把 :func:`get_referrers` 用於偵錯以外的其它" +"目的。" #: ../../library/gc.rst:17 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referrers`` with " "argument ``objs``." msgstr "" +"引發一個附帶引數 ``objs`` 的\\ :ref:`稽核事件 ` ``gc." +"get_referrers``。" #: ../../library/gc.rst:151 msgid "" @@ -198,12 +246,20 @@ msgid "" "example, if an integer is directly reachable from an argument, that integer " "object may or may not appear in the result list." msgstr "" +"回傳包含被任意一個引數直接參照之物件的 list。回傳的被參照物件是有被引數的 C " +"語言級別 :c:member:`~PyTypeObject.tp_traverse` 方法(若存在)訪問到的物件,可" +"能不是所有的實際直接可達物件。只有支援垃圾回收的物件支援 :c:member:" +"`~PyTypeObject.tp_traverse` 方法,並且此方法只會訪問涉及參照迴圈的物件。因" +"此,可以有以下例子:一個整數對於一個引數是直接可達的,這個整數物件有可能出現" +"或不出現在結果的 list 當中。" #: ../../library/gc.rst:9 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referents`` with " "argument ``objs``." msgstr "" +"引發一個附帶引數 ``objs`` 的\\ :ref:`稽核事件 ` ``gc." +"get_referents``。" #: ../../library/gc.rst:163 msgid "" @@ -214,12 +270,21 @@ msgid "" "present in order to suppress the garbage collector footprint of simple " "instances (e.g. dicts containing only atomic keys and values)::" msgstr "" +"當物件正在被垃圾回收器追蹤時回傳 ``True``,否則回傳 ``False``。一般來說,原子" +"型別 (atomic type) 的實例不會被追蹤,而非原子型別(如容器、使用者自己定義的物" +"件)會被追蹤。然而,有一些特定型別最佳化會被用來減少垃圾回收器在簡單實例(如" +"只含有原子性的鍵和值的字典)上的足跡:\n" +"\n" +"::" #: ../../library/gc.rst:188 msgid "" "Returns ``True`` if the given object has been finalized by the garbage " "collector, ``False`` otherwise. ::" msgstr "" +"如果給定物件已被垃圾回收器終結則回傳 ``True``,否則回傳 ``False``。:\n" +"\n" +"::" #: ../../library/gc.rst:209 msgid "" @@ -230,22 +295,27 @@ msgid "" "allocation which can cause copy-on-write too so it's advised to disable gc " "in parent process and freeze before fork and enable gc in child process." msgstr "" +"凍結 (freeze) 垃圾回收器所追蹤的所有物件 —— 將它們移至永久代並忽略所有未來的" +"收集動作。這可以在呼叫 POSIX fork() 之前使用以便寫入時複製 (copy-on-write) 或" +"加速回收。且在 POSIX fork() 呼叫之前的回收也可以釋放分頁 (page) ,以供未來可" +"能導致寫入時複製的記憶體分配來使用,因此建議在主程序 (parent process) 中停用" +"垃圾回收器並在 fork 之前凍結,在子程序中則建議啟用垃圾回收器。" #: ../../library/gc.rst:221 msgid "" "Unfreeze the objects in the permanent generation, put them back into the " "oldest generation." -msgstr "" +msgstr "解凍 (unfreeze) 永久代中的物件,並將它們放回到最年老代中。" #: ../../library/gc.rst:229 msgid "Return the number of objects in the permanent generation." -msgstr "" +msgstr "回傳永久代中的物件數量。" #: ../../library/gc.rst:234 msgid "" "The following variables are provided for read-only access (you can mutate " "the values but should not rebind them):" -msgstr "" +msgstr "以下變數僅供唯讀存取(你可以修改其值但不應該重新繫結 (rebind) 它們):" #: ../../library/gc.rst:239 msgid "" @@ -254,12 +324,17 @@ msgid "" "should be empty most of the time, except when using instances of C extension " "types with a non-``NULL`` ``tp_del`` slot." msgstr "" +"一個回收器發現不可達而又無法被釋放的物件(不可回收物件)list。從 Python 3.4 " +"開始,該 list 在大多數時候都應該是空的,除非使用了有非 ``NULL`` ``tp_del`` 槽" +"位的 C 擴充套件型別的實例。" #: ../../library/gc.rst:244 msgid "" "If :const:`DEBUG_SAVEALL` is set, then all unreachable objects will be added " "to this list rather than freed." msgstr "" +"如果設定了 :const:`DEBUG_SAVEALL`,則所有不可達物件將被加進該 list 而不會被釋" +"放。" #: ../../library/gc.rst:247 msgid "" @@ -268,12 +343,17 @@ msgid "" "`DEBUG_UNCOLLECTABLE` is set, in addition all uncollectable objects are " "printed." msgstr "" +"當 :term:`interpreter shutdown` 即直譯器關閉時,若此 list 非空,會產生 :exc:" +"`ResourceWarning`,在預設情況下此警告不會被提醒。如果設定了 :const:" +"`DEBUG_UNCOLLECTABLE`,所有無法被回收的物件會被印出。" #: ../../library/gc.rst:253 msgid "" "Following :pep:`442`, objects with a :meth:`__del__` method don't end up in :" "attr:`gc.garbage` anymore." msgstr "" +"根據 :pep:`442`,帶有 :meth:`__del__` method 的物件最終不會在 :attr:`gc." +"garbage` 內。" #: ../../library/gc.rst:259 msgid "" @@ -281,72 +361,79 @@ msgid "" "after collection. The callbacks will be called with two arguments, *phase* " "and *info*." msgstr "" +"會被垃圾回收器在回收開始前和完成後呼叫的一系列回呼函式。這些回呼函式在被呼叫" +"時附帶兩個引數:*phase* 和 *info*。" #: ../../library/gc.rst:263 msgid "*phase* can be one of two values:" -msgstr "" +msgstr "*phase* 可為以下兩者之一:" #: ../../library/gc.rst:265 msgid "\"start\": The garbage collection is about to start." -msgstr "" +msgstr "\"start”:垃圾回收即將開始。" #: ../../library/gc.rst:267 msgid "\"stop\": The garbage collection has finished." -msgstr "" +msgstr "\"stop”:垃圾回收已結束。" #: ../../library/gc.rst:269 msgid "" "*info* is a dict providing more information for the callback. The following " "keys are currently defined:" -msgstr "" +msgstr "*info* 是一個字典,提供回呼函式 (callback) 更多資訊。已有定義的鍵有:" #: ../../library/gc.rst:272 msgid "\"generation\": The oldest generation being collected." -msgstr "" +msgstr "\"generation\"(代):正在被回收的最年老的一代。" #: ../../library/gc.rst:274 msgid "" "\"collected\": When *phase* is \"stop\", the number of objects successfully " "collected." msgstr "" +"\"collected\"(已回收的 ):當 *phase* 為 \"stop\" 時,被成功回收的物件的數" +"目。" #: ../../library/gc.rst:277 msgid "" "\"uncollectable\": When *phase* is \"stop\", the number of objects that " "could not be collected and were put in :data:`garbage`." msgstr "" +"\"uncollectable\"(不可回收的):當 *phase* 為 \"stop\" 時,不能被回收並被放" +"入 :data:`garbage` 的物件的數目。" #: ../../library/gc.rst:280 msgid "" "Applications can add their own callbacks to this list. The primary use " "cases are:" -msgstr "" +msgstr "應用程式可以把他們自己的回呼函式加入此 list。主要的使用場景有:" #: ../../library/gc.rst:283 msgid "" "Gathering statistics about garbage collection, such as how often various " "generations are collected, and how long the collection takes." -msgstr "" +msgstr "收集垃圾回收的統計資料,如:不同代的回收頻率、回收任務所花費的時間。" #: ../../library/gc.rst:287 msgid "" "Allowing applications to identify and clear their own uncollectable types " "when they appear in :data:`garbage`." msgstr "" +"讓應用程式可以識別和清理他們自己在 :data:`garbage` 中的不可回收型別物件。" #: ../../library/gc.rst:293 msgid "The following constants are provided for use with :func:`set_debug`:" -msgstr "" +msgstr "以下常數是為了和 :func:`set_debug` 一起使用所提供:" #: ../../library/gc.rst:298 msgid "" "Print statistics during collection. This information can be useful when " "tuning the collection frequency." -msgstr "" +msgstr "在回收完成後印出統計資訊。當調校回收頻率設定時,這些資訊會很有用。" #: ../../library/gc.rst:304 msgid "Print information on collectable objects found." -msgstr "" +msgstr "當發現可回收物件時印出資訊。" #: ../../library/gc.rst:309 msgid "" @@ -354,18 +441,24 @@ msgid "" "reachable but cannot be freed by the collector). These objects will be " "added to the ``garbage`` list." msgstr "" +"印出找到的不可回收物件的資訊(指不能被回收器回收的不可達物件)。這些物件會被" +"新增到 ``garbage`` list 中。" #: ../../library/gc.rst:313 msgid "" "Also print the contents of the :data:`garbage` list at :term:`interpreter " "shutdown`, if it isn't empty." msgstr "" +"當 :term:`interpreter shutdown`\\ (直譯器關閉)時,若 :data:`garbage` list " +"不是空的,那這些內容也會被印出。" #: ../../library/gc.rst:319 msgid "" "When set, all unreachable objects found will be appended to *garbage* rather " "than being freed. This can be useful for debugging a leaking program." msgstr "" +"設定後,所有回收器找到的不可達物件會被加進 *garbage* 而不是直接被釋放。這在為" +"一個記憶體流失的程式偵錯時會很有用。" #: ../../library/gc.rst:325 msgid "" @@ -373,3 +466,5 @@ msgid "" "leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | " "DEBUG_SAVEALL``)." msgstr "" +"要印出記憶體流失程式之相關資訊時,回收器所需的偵錯旗標。(等同於 " +"``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``)。" From b541dd90c22b913c78d1429d8466e996fbf8f6a6 Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Sat, 1 Oct 2022 14:57:58 +0800 Subject: [PATCH 2/2] fix(library/gc): update based on reviewer's comment --- library/gc.po | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/library/gc.po b/library/gc.po index 8126b5ed72..d3f17958e7 100644 --- a/library/gc.po +++ b/library/gc.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-31 08:13+0000\n" -"PO-Revision-Date: 2022-06-12 15:31+0800\n" +"PO-Revision-Date: 2022-10-01 14:57+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -20,7 +20,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.1\n" +"X-Generator: Poedit 3.1.1\n" #: ../../library/gc.rst:2 msgid ":mod:`gc` --- Garbage Collector interface" @@ -40,12 +40,12 @@ msgid "" "saved in gc.garbage for inspection." msgstr "" "此 module(模組)提供可選的垃圾回收器介面,提供的功能包括:關閉回收器、調整回" -"收頻率、設定偵錯選項。它同時提供對回收器有找到但是無法釋放的不可達物件 " +"收頻率、設定除錯選項。它同時提供對回收器有找到但是無法釋放的不可達物件 " "(unreachable object) 的存取。由於 Python 使用了帶有參照計數的回收器,如果你確" "定你的程式不會產生參照迴圈 (reference cycle),你可以關閉回收器。可以透過呼叫 " -"``gc.disable()`` 關閉自動垃圾回收。若要偵錯一個存在記憶體流失 (leak) 的程式," -"請呼叫 ``gc.set_debug(gc.DEBUG_LEAK)``;需要注意的是,它包含 ``gc." -"DEBUG_SAVEALL``,使得被回收的物件會被存放在 gc.garbage 中以待檢查。" +"``gc.disable()`` 關閉自動垃圾回收。若要為一個存在記憶體流失的程式 (leaking " +"program) 除錯,請呼叫 ``gc.set_debug(gc.DEBUG_LEAK)``;需要注意的是,它包含 " +"``gc.DEBUG_SAVEALL``,使得被回收的物件會被存放在 gc.garbage 中以待檢查。" #: ../../library/gc.rst:23 msgid "The :mod:`gc` module provides the following functions:" @@ -71,8 +71,8 @@ msgid "" "invalid. The number of unreachable objects found is returned." msgstr "" "若被呼叫時沒有引數,則啟動完整垃圾回收。可選的引數 *generation* 可以是一個指" -"明需要回收哪一代垃圾的整數(從 0 到 2 )。當引數 *generation* 無效時,會引" -"發 :exc:`ValueError` 例外。發現的不可達物件數目會被回傳。" +"明需要回收哪一代垃圾的整數(從 0 到 2)。當引數 *generation* 無效時,會引發 :" +"exc:`ValueError` 例外。發現的不可達物件數目會被回傳。" #: ../../library/gc.rst:48 msgid "" @@ -91,12 +91,12 @@ msgid "" "written to ``sys.stderr``. See below for a list of debugging flags which " "can be combined using bit operations to control debugging." msgstr "" -"設定垃圾回收器的偵錯旗標。偵錯資訊會被寫入 ``sys.stderr``。請見下方的偵錯旗標" -"列表,可以使用位元操作 (bit operation) 進行設定以控制偵錯程式。" +"設定垃圾回收器的除錯旗標。除錯資訊會被寫入 ``sys.stderr``。請見下方的除錯旗標" +"列表,可以使用位元操作 (bit operation) 進行設定以控制除錯程式。" #: ../../library/gc.rst:63 msgid "Return the debugging flags currently set." -msgstr "回傳當前設置的偵錯旗標。" +msgstr "回傳當前設置的除錯旗標。" #: ../../library/gc.rst:68 msgid "" @@ -224,7 +224,7 @@ msgid "" "other than debugging." msgstr "" "在使用 :func:`get_referrers` 回傳的物件時必須要小心,因為其中的一些物件可能仍" -"在建構中而處於暫時無效的狀態。不要把 :func:`get_referrers` 用於偵錯以外的其它" +"在建構中而處於暫時無效的狀態。不要把 :func:`get_referrers` 用於除錯以外的其它" "目的。" #: ../../library/gc.rst:17 @@ -298,8 +298,8 @@ msgstr "" "凍結 (freeze) 垃圾回收器所追蹤的所有物件 —— 將它們移至永久代並忽略所有未來的" "收集動作。這可以在呼叫 POSIX fork() 之前使用以便寫入時複製 (copy-on-write) 或" "加速回收。且在 POSIX fork() 呼叫之前的回收也可以釋放分頁 (page) ,以供未來可" -"能導致寫入時複製的記憶體分配來使用,因此建議在主程序 (parent process) 中停用" -"垃圾回收器並在 fork 之前凍結,在子程序中則建議啟用垃圾回收器。" +"能導致寫入時複製的記憶體分配來使用,因此建議在父行程 (parent process) 中停用" +"垃圾回收器並在 fork 之前凍結,在子行程中則建議啟用垃圾回收器。" #: ../../library/gc.rst:221 msgid "" @@ -361,8 +361,8 @@ msgid "" "after collection. The callbacks will be called with two arguments, *phase* " "and *info*." msgstr "" -"會被垃圾回收器在回收開始前和完成後呼叫的一系列回呼函式。這些回呼函式在被呼叫" -"時附帶兩個引數:*phase* 和 *info*。" +"會被垃圾回收器在回收開始前和完成後呼叫的一系列回呼函式 (callback) 。這些回呼" +"函式在被呼叫時附帶兩個引數:*phase* 和 *info*。" #: ../../library/gc.rst:263 msgid "*phase* can be one of two values:" @@ -370,17 +370,17 @@ msgstr "*phase* 可為以下兩者之一:" #: ../../library/gc.rst:265 msgid "\"start\": The garbage collection is about to start." -msgstr "\"start”:垃圾回收即將開始。" +msgstr "\"start\":垃圾回收即將開始。" #: ../../library/gc.rst:267 msgid "\"stop\": The garbage collection has finished." -msgstr "\"stop”:垃圾回收已結束。" +msgstr "\"stop\":垃圾回收已結束。" #: ../../library/gc.rst:269 msgid "" "*info* is a dict providing more information for the callback. The following " "keys are currently defined:" -msgstr "*info* 是一個字典,提供回呼函式 (callback) 更多資訊。已有定義的鍵有:" +msgstr "*info* 是一個字典,提供回呼函式更多資訊。已有定義的鍵有:" #: ../../library/gc.rst:272 msgid "\"generation\": The oldest generation being collected." @@ -391,7 +391,7 @@ msgid "" "\"collected\": When *phase* is \"stop\", the number of objects successfully " "collected." msgstr "" -"\"collected\"(已回收的 ):當 *phase* 為 \"stop\" 時,被成功回收的物件的數" +"\"collected\"(已回收的):當 *phase* 為 \"stop\" 時,被成功回收的物件的數" "目。" #: ../../library/gc.rst:277 @@ -458,7 +458,7 @@ msgid "" "than being freed. This can be useful for debugging a leaking program." msgstr "" "設定後,所有回收器找到的不可達物件會被加進 *garbage* 而不是直接被釋放。這在為" -"一個記憶體流失的程式偵錯時會很有用。" +"一個記憶體流失的程式除錯時會很有用。" #: ../../library/gc.rst:325 msgid "" @@ -466,5 +466,5 @@ msgid "" "leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | " "DEBUG_SAVEALL``)." msgstr "" -"要印出記憶體流失程式之相關資訊時,回收器所需的偵錯旗標。(等同於 " +"要印出記憶體流失程式之相關資訊時,回收器所需的除錯旗標。(等同於 " "``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``)。"