__call__

# __author: "ZXYang"
# date: 2020/12/13


class MyTest():

def __call__(self, *args, **kwargs):
print("__call__方法")


m = MyTest()
m()
# __call__方法: m()可直接 【加()】调用对象
posted @ 2020-12-13 11:19  zxy_ang  阅读(54)  评论(0)    收藏  举报