day11 finishing
Vararg
* Name parameter tuple received extra argument position
When you call the function, the number of position argument, it receives the number of
** Katachisan
Receiving excess keyword arguments dictionary
*Arguments
* Lt break the list into a position of elements sequentially passed argument position parameter
** Arguments
** dic broken into the dictionary and keyword arguments passed to the function
Function object
- Quote
- Container element
- As the argument of function
- As the return value of the function
== function object function name
Nested functions
Function which has the function
Internal function defined functions, can not be used outside
Function namespace
Namespace: special storage name
Built-in namespace: stores the name of the built-in method
Data type own built-in method
Global namespace: remove the built-in global and local call
Namespace generates order summary:
- Built-in namespace
- Global name space
- The local name space
Search elements order:
Start looking for the current location, and then can not find in that order, not looking backward
Local ---> Global -----> Built
Scope
Global scope: built-in namespace + global name space
The local scope: local name space
global: let the global become local variables
nonlocal: Let the local variables become the top-level function
All variable data types can break all the rules above