Today's record is a small point of knowledge-the function scope + adorner:
Legb:l>e>g>b
l;local function Internal Scope
e:enclosing function inside and inline function
G:global Global scope
B:build-in built-in scopes
Coding && Result:
Closures ( Closure): An intrinsic function references a variable in the enclosing scope.
The role of closures:
1) package
2) Code Reuse
The nature and properties of the function:
1) function is an object
2) Internal variable recycling after completion of function execution
3) function is an object that has properties
4) function return value
Coding && Result:
Adorner: (for use with closures)
1) is used to decorate the function
2) Returns a function object
3) The decorated function identifier points to the function return object
4) grammar sugar @deco
5) Define the method with no parametric adorner and the basic flow:
6) Define with parameters
Coding && Result:
Python function scope + adorner