Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb04da9d

Browse files
committed
feat: to rst:264
1 parent1477fa8 commitb04da9d

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

‎library/weakref.po

Lines changed: 34 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-03-25 21:54+0800\n"
11+
"PO-Revision-Date:2024-03-26 21:42+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"
@@ -264,29 +264,35 @@ msgid ""
264264
"keys. *callback* is the same as the parameter of the same name to the :func:"
265265
"`ref` function."
266266
msgstr""
267+
"傳回一個使用弱參照的 *object* 的代理 (proxy)。這支援在大多數情境中使用代理,"
268+
"而不需要對弱參照物件明確地取消參照。回傳的物件將具有 ``ProxyType`` 或 "
269+
"``CallableProxyType`` 型別,具體取決於 *object* 是否為可呼叫物件。無論參照目"
270+
"標如何,代理物件都不 :term:`hashable`;這避免了與其基本可變物件本質相關的許多"
271+
"問題,並阻止它們作為字典的鍵被使用。*callback* 與 :func:`ref` 函式的同名參數"
272+
"是相同的。"
267273

268274
#:../../library/weakref.rst:149
269275
msgid""
270276
"Accessing an attribute of the proxy object after the referent is garbage "
271277
"collected raises :exc:`ReferenceError`."
272-
msgstr""
278+
msgstr"在參照目標被垃圾回收後存取代理物件的屬性會引發 :exc:`ReferenceError`。"
273279

274280
#:../../library/weakref.rst:152
275281
msgid""
276282
"Extended the operator support on proxy objects to include the matrix "
277283
"multiplication operators ``@`` and ``@=``."
278-
msgstr""
284+
msgstr"提供對代理物件的運算子支援,以包括矩陣乘法運算子 ``@`` 和 ``@=``。"
279285

280286
#:../../library/weakref.rst:159
281287
msgid""
282288
"Return the number of weak references and proxies which refer to *object*."
283-
msgstr""
289+
msgstr"回傳參照 *object* 的弱參照和代理的數量。"
284290

285291
#:../../library/weakref.rst:164
286292
msgid""
287293
"Return a list of all weak reference and proxy objects which refer to "
288294
"*object*."
289-
msgstr""
295+
msgstr"回傳參照 *object* 的所有弱參照和代理物件的一個串列。"
290296

291297
#:../../library/weakref.rst:169
292298
msgid""
@@ -296,6 +302,9 @@ msgid ""
296302
"of an application without adding attributes to those objects. This can be "
297303
"especially useful with objects that override attribute accesses."
298304
msgstr""
305+
"弱參照鍵的對映類別。當不再有對鍵的強參照時,字典中的條目將被丟棄。這可用於將"
306+
"附加資料與應用程式其他部分擁有的物件相關聯,而無需向這些物件新增屬性。這對於"
307+
"覆蓋屬性存取的物件特別有用。"
299308

300309
#:../../library/weakref.rst:175
301310
msgid""
@@ -304,10 +313,13 @@ msgid ""
304313
"not replace the existing key. Due to this, when the reference to the "
305314
"original key is deleted, it also deletes the entry in the dictionary::"
306315
msgstr""
316+
"請注意,當將與現有鍵具有相同值的鍵(但識別性不相等)插入字典時,它會替換該"
317+
"值,但不會替換現有鍵。因此,當刪除對原始鍵的參照時,它也會刪除字典中的條"
318+
"目: ::"
307319

308320
#:../../library/weakref.rst:188
309321
msgid"A workaround would be to remove the key prior to reassignment::"
310-
msgstr""
322+
msgstr"解決方法是在重新賦值 (reassignment) 之前刪除鍵: ::"
311323

312324
#:../../library/weakref.rst:199
313325
msgid"Added support for ``|`` and ``|=`` operators, specified in :pep:`584`."
@@ -322,37 +334,44 @@ msgid ""
322334
"references that will cause the garbage collector to keep the keys around "
323335
"longer than needed."
324336
msgstr""
337+
":class:`WeakKeyDictionary` 物件有一個直接公開內部參照的附加方法。參照在被使用"
338+
"時不保證是\"存活的\",因此在使用之前需要檢查呼叫參照的結果。這可以用來防止建"
339+
"立會導致垃圾回收器保留鍵的時間超過其所需時間的參照。"
325340

326341
#:../../library/weakref.rst:212
327342
msgid"Return an iterable of the weak references to the keys."
328-
msgstr""
343+
msgstr"傳回對鍵的弱參照的可疊代物件。"
329344

330345
#:../../library/weakref.rst:217
331346
msgid""
332347
"Mapping class that references values weakly. Entries in the dictionary will "
333348
"be discarded when no strong reference to the value exists any more."
334-
msgstr""
349+
msgstr"弱參照值的對映類別。當不再存在對值的強參照時,字典中的條目將被丟棄。"
335350

336351
#:../../library/weakref.rst:220
337352
msgid""
338353
"Added support for ``|`` and ``|=`` operators, as specified in :pep:`584`."
339-
msgstr""
354+
msgstr"新增對 ``|`` 和 ``|=`` 運算子的支持,如 :pep:`584` 中所說明。"
340355

341356
#:../../library/weakref.rst:223
342357
msgid""
343358
":class:`WeakValueDictionary` objects have an additional method that has the "
344359
"same issues as the :meth:`WeakKeyDictionary.keyrefs` method."
345360
msgstr""
361+
":class:`WeakValueDictionary` 物件有一個附加方法,它與 :meth:"
362+
"`WeakKeyDictionary.keyrefs` 方法有相同的問題。"
346363

347364
#:../../library/weakref.rst:229
348365
msgid"Return an iterable of the weak references to the values."
349-
msgstr""
366+
msgstr"傳回對值的弱參照的可疊代物件。"
350367

351368
#:../../library/weakref.rst:234
352369
msgid""
353370
"Set class that keeps weak references to its elements. An element will be "
354371
"discarded when no strong reference to it exists any more."
355372
msgstr""
373+
"保留對其元素的弱參照的集合類別。當不再存在對某個元素的強參照時,該元素將被丟"
374+
"棄。"
356375

357376
#:../../library/weakref.rst:240
358377
msgid""
@@ -362,12 +381,16 @@ msgid ""
362381
"hold of it. :class:`WeakMethod` has special code to recreate the bound "
363382
"method until either the object or the original function dies::"
364383
msgstr""
384+
"一個特製的 :class:`ref` 子類別,其模擬對繫結函式 (bound method ) (即在類別上"
385+
"定義並在實例上查找的方法)的弱參照。由於繫結函式是短暫存在的,因此標準弱參照"
386+
"無法保留它。:class:`WeakMethod` 有特殊的程式碼來重新建立繫結函式,直到物件或"
387+
"原始函式死亡: ::"
365388

366389
#:../../library/weakref.rst:264
367390
msgid""
368391
"*callback* is the same as the parameter of the same name to the :func:`ref` "
369392
"function."
370-
msgstr""
393+
msgstr"*callback* 與 :func:`ref` 函式的同名參數是相同的。"
371394

372395
#:../../library/weakref.rst:270
373396
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp