Python Decorators in 12 Steps (2012)
Maybe writing lots of decorators helps you applying this concept when you need to solve some sort of complex problems. However, I fail to understand the usefulnesses of the examples given in all the tutorials I read about decorators. Sure, it helps to D.R.Y when you want to log something or deal with authentication. Yet I find they infringe the "explicit is better than implicit" rule.When I read code not written by myself and see this:@somethingdef foo(bar):...It is not immediately clear to me what foo actually does whereasdef foo(bar):# some function calls here# next: what foo does with these results# some more function calls on what has been done beforegives me a hint without scrolling through the code.