PYTHON Learning 0026: nested functions and scope function --- ---- 2019-6-19

1, after the function definition, as long as no call, its internal code is never executed.
2, the internal function can be redefined function
3, when there are variable nested functions, find the first function value in the present scope of the function level, without looking up the stepwise. (This level - the parent - grandfather global level --....-), found it not to continue further on to find them.

作用域:
First, in PYTHON, one is a function scope, after the function definition is complete, the scope has been generated, the future no matter where you call the same scope.

Guess you like

Origin blog.51cto.com/13543767/2411285
Recommended