正在加载图片...
Terminology:Frames Global frame function square(x) A frame keeps track of varia square Every call expression has a corr square Global,a.k.a.the global fr 4 arting frame. It doesn't correspond to a speci Return 1. 16 Parent frames value The parent of a function is the frame in which it was defined. If you can't find a variable in the current frame,you check it's parent,and so on.If you can't find the variable,NameError DemoTerminology: Frames A frame keeps track of variable-to-value bindings. ● Every call expression has a corresponding frame. Global, a.k.a. the global frame, is the starting frame. ● It doesn't correspond to a specific call expression. Parent frames ● The parent of a function is the frame in which it was defined. ● If you can't find a variable in the current frame, you check it's parent, and so on. If you can't find the variable, NameError Demo
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有