An environment in which an expression is evaluated consists of a sequence of
frames, depicted as boxes. Each frame contains bindings, each of which
associates a name with its corresponding value. There is a single global
frame. Assignment and import statements add entries to the first frame of the
current environment.
If you want to change selection, open document below and click on "Move attachment"
1.3 Defining New Functionsgh that the meaning of programs is
non-obvious. What if a formal parameter has the same name as a built-in
function? Can two functions share names without confusion? To resolve such
questions, we must describe environments in more detail.
<span>An environment in which an expression is evaluated consists of a sequence of
frames, depicted as boxes. Each frame contains bindings, each of which
associates a name with its corresponding value. There is a single global
frame. Assignment and import statements add entries to the first frame of the
current environment. So far, our environment consists only of the global frame.
1 from math import pi 2 tau = 2 * pi Edit code in Online Python Tutor Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details