Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11b1e52 commit 20bad48Copy full SHA for 20bad48
2 files changed
.stat.json
@@ -1 +1 @@
1
-{"translation": "95.08%", "updated_at": "2024-05-30T15:47:07Z"}
+{"translation": "95.08%", "updated_at": "2024-05-30T16:47:04Z"}
whatsnew/2.1.po
@@ -613,6 +613,10 @@ msgid ""
613
"were a function: ``wr()``. It will return the referenced object, or "
614
"``None`` if the object no longer exists."
615
msgstr ""
616
+"弱引用提供了一种实现缓存的方法,不会让对象在其生命周期结束后仍然存活。如果一个对象仅通过弱引用访问,该对象将被释放,并且弱引用将指示它所引用的对象不再存在。通过调用"
617
+" ``wr = weakref.ref(obj)`` 来创建对对象 *obj* "
618
+"的弱引用。通过调用弱引用,就像调用函数一样,可以返回被引用的对象:``wr()``。如果对象仍然存在,它将返回被引用的对象;如果对象不再存在,则返回 "
619
+"``None``。"
620
621
#: ../../whatsnew/2.1.rst:382
622
msgid ""
0 commit comments