local variable 'a' referenced before assignment a = 2 def wrapper(): a += 1 print(a) wrapper() 局部变量不能修改全局变量