Study notes (20): zero-base mastering Python entry to actual combat-layers of nesting, successively different

Learn now: https://edu.csdn.net/course/play/26676/338788?utm_source=blogtoedu

Nested functions and decorators:

Quote: A relationship is established.

The parameters of the function refer to an object, and then perform operations on the object.

Function () means to call a function and execute this object.

If it is just the function itself without parentheses, it means the address of the function in memory.

The function itself is an object. When defining a function, the parameters can refer to any object.

Functions can be nested in functions.

If you want to execute a function, you must call it.

The scope of the function.

global declares global variables.

nonlocal to declare non-local variables.

 

 

 

 

 

Guess you like

Origin blog.csdn.net/m0_49939521/article/details/108885384