x = 3 def f(): # x <-- would be a real error here, x = 4 below has shadowed x from global scope x = 4