-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgstr "" | |
"Project-Id-Version: Python 3.12\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-10-11 17:13+0000\n" | ||
"PO-Revision-Date: 2024-03-25 21:54+0800\n" | ||
"PO-Revision-Date: 2024-03-26 21:42+0800\n" | ||
"Last-Translator: Adrian Liaw <[email protected]>\n" | ||
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" | ||
"tw)\n" | ||
|
@@ -264,29 +264,35 @@ msgid "" | |
"keys. *callback* is the same as the parameter of the same name to the :func:" | ||
"`ref` function." | ||
msgstr "" | ||
"傳回一個使用弱參照的 *object* 的代理 (proxy)。這支援在大多數情境中使用代理," | ||
"而不需要對弱參照物件明確地取消參照。回傳的物件將具有 ``ProxyType`` 或 " | ||
"``CallableProxyType`` 型別,具體取決於 *object* 是否為可呼叫物件。無論參照目" | ||
"標如何,代理物件都不 :term:`hashable`;這避免了與其基本可變物件本質相關的許多" | ||
"問題,並阻止它們作為字典的鍵被使用。*callback* 與 :func:`ref` 函式的同名參數" | ||
"是相同的。" | ||
|
||
#: ../../library/weakref.rst:149 | ||
msgid "" | ||
"Accessing an attribute of the proxy object after the referent is garbage " | ||
"collected raises :exc:`ReferenceError`." | ||
msgstr "" | ||
msgstr "在參照目標被垃圾回收後存取代理物件的屬性會引發 :exc:`ReferenceError`。" | ||
|
||
#: ../../library/weakref.rst:152 | ||
msgid "" | ||
"Extended the operator support on proxy objects to include the matrix " | ||
"multiplication operators ``@`` and ``@=``." | ||
msgstr "" | ||
msgstr "提供對代理物件的運算子支援,以包括矩陣乘法運算子 ``@`` 和 ``@=``。" | ||
|
||
#: ../../library/weakref.rst:159 | ||
msgid "" | ||
"Return the number of weak references and proxies which refer to *object*." | ||
msgstr "" | ||
msgstr "回傳參照 *object* 的弱參照和代理的數量。" | ||
|
||
#: ../../library/weakref.rst:164 | ||
msgid "" | ||
"Return a list of all weak reference and proxy objects which refer to " | ||
"*object*." | ||
msgstr "" | ||
msgstr "回傳參照 *object* 的所有弱參照和代理物件的一個串列。" | ||
|
||
#: ../../library/weakref.rst:169 | ||
msgid "" | ||
|
@@ -296,6 +302,9 @@ msgid "" | |
"of an application without adding attributes to those objects. This can be " | ||
"especially useful with objects that override attribute accesses." | ||
msgstr "" | ||
"弱參照鍵的對映類別。當不再有對鍵的強參照時,字典中的條目將被丟棄。這可用於將" | ||
"附加資料與應用程式其他部分擁有的物件相關聯,而無需向這些物件新增屬性。這對於" | ||
"覆蓋屬性存取的物件特別有用。" | ||
|
||
#: ../../library/weakref.rst:175 | ||
msgid "" | ||
|
@@ -304,10 +313,13 @@ msgid "" | |
"not replace the existing key. Due to this, when the reference to the " | ||
"original key is deleted, it also deletes the entry in the dictionary::" | ||
msgstr "" | ||
"請注意,當將與現有鍵具有相同值的鍵(但識別性不相等)插入字典時,它會替換該" | ||
"值,但不會替換現有鍵。因此,當刪除對原始鍵的參照時,它也會刪除字典中的條" | ||
"目: ::" | ||
|
||
#: ../../library/weakref.rst:188 | ||
msgid "A workaround would be to remove the key prior to reassignment::" | ||
msgstr "" | ||
msgstr "解決方法是在重新賦值 (reassignment) 之前刪除鍵: ::" | ||
|
||
#: ../../library/weakref.rst:199 | ||
msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`." | ||
|
@@ -322,37 +334,44 @@ msgid "" | |
"references that will cause the garbage collector to keep the keys around " | ||
"longer than needed." | ||
msgstr "" | ||
":class:`WeakKeyDictionary` 物件有一個直接公開內部參照的附加方法。參照在被使用" | ||
"時不保證是 \"存活的\",因此在使用之前需要檢查呼叫參照的結果。這可以用來防止建" | ||
"立會導致垃圾回收器保留鍵的時間超過其所需時間的參照。" | ||
|
||
#: ../../library/weakref.rst:212 | ||
msgid "Return an iterable of the weak references to the keys." | ||
msgstr "" | ||
msgstr "傳回對鍵的弱參照的可疊代物件。" | ||
|
||
#: ../../library/weakref.rst:217 | ||
msgid "" | ||
"Mapping class that references values weakly. Entries in the dictionary will " | ||
"be discarded when no strong reference to the value exists any more." | ||
msgstr "" | ||
msgstr "弱參照值的對映類別。當不再存在對值的強參照時,字典中的條目將被丟棄。" | ||
|
||
#: ../../library/weakref.rst:220 | ||
msgid "" | ||
"Added support for ``|`` and ``|=`` operators, as specified in :pep:`584`." | ||
msgstr "" | ||
msgstr "新增對 ``|`` 和 ``|=`` 運算子的支持,如 :pep:`584` 中所說明。" | ||
|
||
#: ../../library/weakref.rst:223 | ||
msgid "" | ||
":class:`WeakValueDictionary` objects have an additional method that has the " | ||
"same issues as the :meth:`WeakKeyDictionary.keyrefs` method." | ||
msgstr "" | ||
":class:`WeakValueDictionary` 物件有一個附加方法,它與 :meth:" | ||
"`WeakKeyDictionary.keyrefs` 方法有相同的問題。" | ||
|
||
#: ../../library/weakref.rst:229 | ||
msgid "Return an iterable of the weak references to the values." | ||
msgstr "" | ||
msgstr "傳回對值的弱參照的可疊代物件。" | ||
|
||
#: ../../library/weakref.rst:234 | ||
msgid "" | ||
"Set class that keeps weak references to its elements. An element will be " | ||
"discarded when no strong reference to it exists any more." | ||
msgstr "" | ||
"保留對其元素的弱參照的集合類別。當不再存在對某個元素的強參照時,該元素將被丟" | ||
"棄。" | ||
|
||
#: ../../library/weakref.rst:240 | ||
msgid "" | ||
|
@@ -362,12 +381,16 @@ msgid "" | |
"hold of it. :class:`WeakMethod` has special code to recreate the bound " | ||
"method until either the object or the original function dies::" | ||
msgstr "" | ||
"一個特製的 :class:`ref` 子類別,其模擬對繫結函式 (bound method ) (即在類別上" | ||
"定義並在實例上查找的方法)的弱參照。由於繫結函式是短暫存在的,因此標準弱參照" | ||
"無法保留它。:class:`WeakMethod` 有特殊的程式碼來重新建立繫結函式,直到物件或" | ||
"原始函式死亡: ::" | ||
|
||
#: ../../library/weakref.rst:264 | ||
msgid "" | ||
"*callback* is the same as the parameter of the same name to the :func:`ref` " | ||
"function." | ||
msgstr "" | ||
msgstr "*callback* 與 :func:`ref` 函式的同名參數是相同的。" | ||
|
||
#: ../../library/weakref.rst:270 | ||
msgid "" | ||
|