[Python] __call__
[Python] __call__
class sample():
def __call__(self,arg_call):
print("__call__ is executed, the arg is %s")
a=sample()
a("test")
__call__ is executed, the arg is test
class sample():
def __call__(self,arg_call):
print("__call__ is executed, the arg is %s")
a=sample()
a("test")
__call__ is executed, the arg is test