Evaluate Variable Argument State Property
If Python is in the "begin_expr" state at time t, and the current expression is variable x, and there is a parent expression, then at time t + 1, the state is "return." More formally:
if the following are true:
- expression state at time t = "begin_expr"
- the expression at time t = x
- x is a variable
- parent stack at time t = [ y, z ]
then expression state at time (t + 1) = "return"
A variable is evaluated in 1 step (look up the variables map). Next, Python will try to evaluate other arguments, if any.
For example,
if the following are true:
- the expression at time 5 = x
- expression state at time 5 = "begin_expr"
- x is a variable
- parent stack at time 5 = [
__add__(x, 3)
, [ ] ]
then expression state at time (5 + 1) = "return"
Try stepping through the simulator to see the "Expression State" change to "return."
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments