2016-12-01から1ヶ月間の記事一覧
pythonで class test(object): def __call__(self, x, y): return x*y a = test() a(1,2) # => 2 みたいにすることで関数みたいにオブジェクトを呼べる。
pythonで class test(object): def __call__(self, x, y): return x*y a = test() a(1,2) # => 2 みたいにすることで関数みたいにオブジェクトを呼べる。