输出
be in __init__ method 调用__call__方法 a() #一般类是没有这种语法的,这里是因为我们给它写了__call__方法。等同于
a.__call__()输出
be in __call__ method be in called method 调用类中的其它方法 a.test() #说明__call__方法的使用并不会屏蔽其它方法的调用输出
be in test method 将类实例化为同名对象 instance(2) #就算类的定义没有设置位置参数x,如instance(),初始化方法的优先级也是高于__call__方法的。输出
be in __init__ method <__main__.instance object at 0x0000022D9DBC3E88>拓展
