In Python, this code is an example of decorators:
# Do stuff
main_func is called, it will call
main_func as the only argument. It will then call the returned function* instead of
main_func with the arguments provided.
*A decorator doesn't have to return a function, but that doesn't really matter.
Read this for more info on Python decorators.
Anyway, as you can see above, Python uses
@ and then the decorator function name before the main function definition. Are there any other syntax options for implementing this? And what are their advantages and disadvantages?