承前:Pythonのデコレータ(decorator)を理解する 1 デコレータ詳説 先の例に対して、デコレータ構文を使うと次のようになる: @my_shiny_new_decorator def another_stand_alone_function(): print "Leave me alone" another_stand_alone_function() #出力: #Before the function runs #Leave me alone #After the function runs そう、これで全部、シンプルだ。@decoratorは単なる、 another_stand_alone_function = my_shiny_new_decorator(another_stand_alone_function) のショートカットにすぎない。Decoratorはデザインパ