どうも hrkblog です. 久しぶりの更新になってしまった.... 今回はデコレーターの最終回です. デコレータで動的にデコレートしていきます. 早速コードを見ていきます..!! # plus_arg() is injected into Foo def plus_arg(self, a, b): return a + b # minus_arg() is injected into Foo def minus_arg(self, a, b): return a - b def change_methods(new): if new.__name__ != '__new__': retur…