def foo():
def bar():
nonlocal msg
msg = 'Inside'
bar()
print(msg)
def foo():
msg = 'Outside'
def bar():
nonlocal msg
msg = 'Inside'
bar()
print(msg)
Emitted when a nonlocal
variable does not have an attached name somewhere in
the parent scopes.