Realize the Knowledge reserve of adorners:
Example: Def F1 ():p rint ("F1") 1, the function is a "variable" #上面的示例中, the function is F1 as a variable, it points to the memory address. and F1 () indicates that the function executes. 2. High-order function A: Pass a function name as an argument to another function (add a function to it without modifying the source code of the decorated function). B: The return value contains the function name (does not modify the function's calling method). 3. Nested functions place a function inside another function. Adorner = higher order function + nested function
Adorner definition: The essence is a function. (Decorating other functions) is to add additional functionality to other functions.
Adorner principle:
1. The source code of the decorated function cannot be modified.
2. Cannot modify the method of calling the decorated function.
Python's Path to Growth "fourth": Decorators