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 1f5fd3c commit 8c1d3ccCopy full SHA for 8c1d3cc
2 files changed
.stat.json
@@ -1 +1 @@
1
-{"translation": "95.33%", "updated_at": "2024-07-06T07:47:12Z"}
+{"translation": "95.33%", "updated_at": "2024-07-08T08:46:56Z"}
whatsnew/2.2.po
@@ -502,6 +502,11 @@ msgid ""
502
"with this in mind. Finally, calling a function on every attribute access "
503
"results in a sizable performance loss."
504
msgstr ""
505
+"然而,Python 2.2 对 :dfn:`properties` 的支持通常是捕获属性引用的更简单方法。编写 :meth:`!__getattr__`"
506
+" 方法非常复杂,因为为了避免递归,你不能在其中使用常规的属性访问,而是不得不处理 :attr:`~object.__dict__` "
507
+"的内容。此外,:meth:`~object.__getattr__` 方法在 Python 检查其他例如 "
508
+":meth:`~object.__repr__` 或 :meth:`!__coerce__` "
509
+"等方法时也会被调用,因此在编写时需要考虑这些情况。最后,每次属性访问都调用一个函数会导致显著的性能损失。"
510
511
#: ../../whatsnew/2.2.rst:337
512
msgid ""
0 commit comments