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 db33efd commit c2966dfCopy full SHA for c2966df
1 file changed
reference/datamodel.po
@@ -842,6 +842,8 @@ msgid ""
842
" itself, and its :attr:`__func__` attribute is the function object "
843
"underlying the class method."
844
msgstr ""
845
+"当通过从类或实例获取一个类方法对象的方式创建一个实例对象时,实例对象的 :attr:`__self__` 属性为该类本身,其 "
846
+":attr:`__func__` 属性为类方法对应的下层函数对象。"
847
848
#: ../../reference/datamodel.rst:588
849
msgid ""
@@ -852,6 +854,9 @@ msgid ""
852
854
"and ``x`` is an instance of :class:`C`, calling ``x.f(1)`` is equivalent to "
853
855
"calling ``C.f(x, 1)``."
856
857
+"当一个实例方法对象被调用时,会调用对应的下层函数 (:attr:`__func__`),并将类实例 (:attr:`__self__`) "
858
+"插入参数列表的开头。例如,当 :class:`C` 是一个包含了 :meth:`f` 函数定义的类,而 ``x`` 是 :class:`C` "
859
+"的一个实例,则调用 ``x.f(1)`` 就等同于调用 ``C.f(x, 1)``。"
860
861
#: ../../reference/datamodel.rst:595
862
0 commit comments