Skip to content

Commit edceec1

Browse files
committed
Update v3/docs/opt-trace-format.md
1 parent 7b48697 commit edceec1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

v3/docs/opt-trace-format.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ Ok now let's look at the second point, which corresponds to the frontend visuali
177177
}
178178
```
179179

180+
Ok note that `line` is now 2, which means that line 2 is *about* to execute (yes, this convention is a bit confusing,
181+
but it's what the bdb debugger gives us). `globals` is now populated with one key-value pair: the global variable
182+
`x` has a value of `5`. That makes sense since we just executed line 1 (from the previous execution point),
183+
which was the code `x = 5`. If you look at the
184+
[visualization at this step](http://pythontutor.com/visualize.html#code=x+%3D+5%0Ay+%3D+10%0Az+%3D+x+%2B+y&mode=display&cumulative=false&py=2&curInstr=1),
185+
you'll see that `x` has been assigned to `5`.
180186

181187

182188
```javascript

0 commit comments

Comments
 (0)