Skip to content

Commit 7b182f5

Browse files
authored
Merge pull request yidao620c#292 from liuyuzhou/patch-1
Update p20_call_method_on_object_by_string_name.rst
2 parents 958899a + 45ee302 commit 7b182f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/c08/p20_call_method_on_object_by_string_name.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
----------
5858
讨论
5959
----------
60-
调用一个方法实际上是两部独立操作,第一步是查找属性,第二步是函数调用。
60+
调用一个方法实际上是两步独立操作,第一步是查找属性,第二步是函数调用。
6161
因此,为了调用某个方法,你可以首先通过 ``getattr()`` 来查找到这个属性,然后再去以函数方式调用它即可。
6262

6363
``operator.methodcaller()`` 创建一个可调用对象,并同时提供所有必要参数,

0 commit comments

Comments
 (0)