摘要:
L-----local 局部名字空间E-----enclosing 直接外围空间G-----global 全局名字空间B-----builtin 内建名字空间变量名是按照这个顺序搜索的。看下面这段程序:x = 99print("outside of function","x=",x)def funa(y): print("in the funa,x=",x) print("in the funa,y=",y) def funb(): print("in the funb,x =",x) prin 阅读全文