99# Menghua Xiao <[email protected] >, 20211010# Siyuan Xu, 2021
1111# Freesand Leo <[email protected] >, 202212+ # Jiuh-star <[email protected] >, 20231213#
1314#, fuzzy
1415msgid ""
1516msgstr ""
1617"Project-Id-Version : Python 3.12\n "
1718"Report-Msgid-Bugs-To : \n "
18- "POT-Creation-Date : 2023-07-28 14:13+0000\n "
19+ "POT-Creation-Date : 2023-09-22 14:13+0000\n "
1920"PO-Revision-Date : 2021-06-28 01:17+0000\n "
20- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2022 \n "
21+ "Last-Translator : Jiuh-star <jiuh.star@gmail .com>, 2023 \n "
2122"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2223"MIME-Version : 1.0\n "
2324"Content-Type : text/plain; charset=UTF-8\n "
@@ -31,19 +32,19 @@ msgstr ":mod:`weakref` --- 弱引用"
3132
3233#: ../../library/weakref.rst:14
3334msgid "**Source code:** :source:`Lib/weakref.py`"
34- msgstr "**源码 :** :source:`Lib/weakref.py`"
35+ msgstr "**源代码 :** :source:`Lib/weakref.py`"
3536
3637#: ../../library/weakref.rst:18
3738msgid ""
3839"The :mod:`weakref` module allows the Python programmer to create :dfn:`weak "
3940"references` to objects."
40- msgstr ":mod:`weakref` 模块允许Python程序员创建对象的 :dfn:`weak references ` 。"
41+ msgstr ":mod:`weakref` 模块允许 Python 程序员创建对象的 :dfn:`弱引用 ` 。"
4142
4243#: ../../library/weakref.rst:24
4344msgid ""
4445"In the following, the term :dfn:`referent` means the object which is "
4546"referred to by a weak reference."
46- msgstr "在下文中,术语 :dfn:`referent` 表示由弱引用引用的对象 。"
47+ msgstr "在下文中,术语 :dfn:`所指对象` 表示弱引用所指向的对象 。"
4748
4849#: ../../library/weakref.rst:27
4950msgid ""
@@ -54,15 +55,15 @@ msgid ""
5455"the weak reference may return the object even if there are no strong "
5556"references to it."
5657msgstr ""
57- "对对象的弱引用不能保证对象存活:当对像的引用只剩弱引用时 , :term:`garbage collection` "
58- "可以销毁引用并将其内存重用于其他内容 。但是,在实际销毁对象之前,即使没有强引用,弱引用也一直能返回该对象 。"
58+ "对象的弱引用不能保证对象存活:当所指对像的引用只剩弱引用时 , :term:`garbage collection` "
59+ "可以销毁所指对象,并将其内存重新用于其它用途 。但是,在实际销毁对象之前,即使没有强引用,弱引用也能返回该对象 。"
5960
6061#: ../../library/weakref.rst:33
6162msgid ""
6263"A primary use for weak references is to implement caches or mappings holding"
6364" large objects, where it's desired that a large object not be kept alive "
6465"solely because it appears in a cache or mapping."
65- msgstr "弱引用的主要用途是实现保存大对象的高速缓存或映射,但又不希望大对象仅仅因为它出现在高速缓存或映射中而保持存活 。"
66+ msgstr "弱引用的一个主要用途是实现一个存储大型对象的缓存或映射,但又不希望该大型对象仅因为它只出现在这个缓存或映射中而保持存活 。"
6667
6768#: ../../library/weakref.rst:37
6869msgid ""
@@ -79,12 +80,12 @@ msgid ""
7980"collection can reclaim the object, and its corresponding entries in weak "
8081"mappings are simply deleted."
8182msgstr ""
82- "例如,如果您有许多大型二进制图像对象,则可能希望将名称与每个对象关联起来。如果您使用Python字典将名称映射到图像,或将图像映射到名称,则图像对象将保持活动状态,因为它们在字典中显示为值或键。"
83- " :mod:`weakref` 模块提供的 :class:`WeakKeyDictionary` 和 "
83+ "例如,如果你有许多大型二进制图像对象,你可能希望为每个对象关联一个名称。如果你使用 Python "
84+ "字典来将名称映射到图像,或将图像映射到名称,那么图像对象将因为它们在字典中作为值或键而保持存活。 :mod:`weakref` 模块提供的 "
85+ ":class:`WeakKeyDictionary` 和 :class:`WeakValueDictionary` 类可以替代 Python "
86+ "字典,它们使用弱引用来构造映射,这种映射不会仅因为对象出现在映射中而使对象保持存活。例如,如果一个图像对象是 "
8487":class:`WeakValueDictionary` "
85- "类可以替代Python字典,使用弱引用来构造映射,这些映射不会仅仅因为它们出现在映射对象中而使对象保持存活。例如,如果一个图像对象是 "
86- ":class:`WeakValueDictionary` "
87- "中的值,那么当对该图像对象的剩余引用是弱映射对象所持有的弱引用时,垃圾回收可以回收该对象并将其在弱映射对象中相应的条目删除。"
88+ "中的值,那么当对该图像对象的剩余引用是弱映射对象所持有的弱引用时,垃圾回收器将回收该对象,并删除弱映射对象中相应的条目。"
8889
8990#: ../../library/weakref.rst:50
9091msgid ""
0 commit comments