Dynamic Scope: nonlocal
Nonlocal doesn't have anything to do with dynamic scope.
nonlocal
only makes vars from the top scope to be editable, nothing else.
Global somehow con implement dynamic scope.
Dynamic scope means its going to search the declarations in the current block first and then the block where the function was created.
En dinámico:
g(){
print a + b
}
f(){
a = 10
b = 20
g() # Devuelve 30
}
a = 1
b = 2
g() # Devuelve 3