Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions explain/explain.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ def _call_handler(_):

message = result_forwards.output

if m := re.search(r".*Now =.*", message):
if m := re.search(r".*Now = (.*)", message):
# If we found a value change, extract just the "Now =" part of the message.
message = m[0]
message = f"has just been assigned value {m[1]}"

# Put short messages on the same line as "Expression changed".
separator = " " if len(message.splitlines()) == 1 else "\n"
Expand Down
4 changes: 0 additions & 4 deletions explain/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ source lines:
This works even when the memory location was modified a long time ago or in a
different function.

When `last` returns it specifies a "Was" value, which is what you were
investigating. "Now" is the previous value, which should be ignored or used
for a new debugging hypothesis.

`last` will only work for values that are currently in scope. If a value is not
currently in scope then you need to navigate backwards in time until it is. Using
`reverse_step`, `reverse_next` and `reverse_finish` can help you work
Expand Down