2 ms·
It makes explicit stuff like operator precedence, but it's especially helpful when you have to explain function calls and recursion. For the latter specificall
by int_19h 4y ago
It makes explicit stuff like operator precedence, but it's especially helpful when you have to explain function calls and recursion.
For the latter specifically, Thonny has a mode where for every call stack frame, it opens up a separate child editor window that displays the code of the function in that frame, highlighting the current line. When you step through, the visual substitution of expression results happens in the window for the frame where it is happening. Thus, when you have a chain of recursive calls, you can see all the substitutions that it took to get there.