Advancted functions
- Variable scopes
- Name resolution order (LEGB)
- Scoping: global seen from fuction
- Assignment creates local scope
- Local scope gone wrong
- Changing global variable from a function
- Global variables mutable in functions
- Scoping issues
- sub in sub
- Scoping sub in sub (enclosing scope)
- Function objects
- Functions are created at run time
- Mutable default
- Use None as default parameter
- Inner function created every time the outer function runs
- Static variable
- Static variable in generated function
- Inspect