python 内置函数
https://www.runoob.com/python/python-built-in-functions.html
Python 内置函数
getattr
class A(object): def set(self, a, b): x = a a = b b = x print (a, b) a = A() print(a) # <__main__.A at 0x7f76891f2310> c = getattr(a, 'set') print(c) # <bound method A.set of <__main__.A object at 0x7f76891f2310>>