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 0967ff7 commit 46067faCopy full SHA for 46067fa
1 file changed
library/functions.po
@@ -706,6 +706,9 @@ msgid ""
706
"a custom :func:`__getattr__` or :func:`__getattribute__` function to "
707
"customize the way :func:`dir` reports their attributes."
708
msgstr ""
709
+"如果对象有一个名为 :meth:`__dir__` 的方法,那么该方法将被调用,并且必须返回一个属性列表。这允许实现自定义 "
710
+":func:`__getattr__` 或 :func:`__getattribute__` 函数的对象能够自定义 :func:`dir` "
711
+"来报告它们的属性。"
712
713
#: ../../library/functions.rst:333
714
msgid ""
@@ -715,6 +718,8 @@ msgid ""
715
718
" complete, and may be inaccurate when the object has a custom "
716
719
":func:`__getattr__`."
717
720
721
+"如果对象不提供 :meth:`__dir__`,这个函数会尝试从对象已定义的 :attr:`~object.__dict__` "
722
+"属性和类型对象收集信息。结果列表并不总是完整的,如果对象有自定义 :func:`__getattr__`,那结果可能不准确。"
723
724
#: ../../library/functions.rst:338
725
0 commit comments