2016-12-30 __call__メソッド pythonで class test(object): def __call__(self, x, y): return x*y a = test() a(1,2) # => 2 みたいにすることで関数みたいにオブジェクトを呼べる。