Reference address:
http://www.cnblogs.com/alex3714/articles/5765046.html
Contents of this section:
decorator
Definition: The essence is a function, (decorating other functions) is to add additional functions to other functions.
Principles: 1. The source code of the decorated function cannot be modified.
2. The calling method of the decorated function cannot be modified.
(In short: the original function does not feel that it has been modified)
Implement decorator knowledge reserve: higher-order function + nested function = "decorator
1. Functions are variables
2. Higher-order functions: A higher-order function is a function that satisfies one of the following conditions
a. Pass a function name as an argument to another function
b. The return value contains the function name
3. Nested functions