Skip to content

Conversation

@ppotapov-aws
Copy link
Collaborator

Trace fun things like:

def f():
  print("Here we go again")
  assert 2 + 2 == 5, f"Some fun math you do, huh. Should be {2 + 2}"

Produces

Here we go again

/Users/ppotapov/work/KLR/./test.py:26:
  assert 2 + 2 == 5, f"Some fun math you do, huh. Should be {2 + 2}"
   ^-- assertion failed, Some fun math you do, huh. Should be 4
Traceback (most recent call last):
  File "/Users/ppotapov/work/KLR/./test.py", line 62, in <module>
    t.trace()
  File "/Users/ppotapov/work/KLR/./test.py", line 57, in trace
    raise Exception("tracing error")
Exception: tracing error

Copy link
Collaborator

@govereau govereau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@ppotapov-aws ppotapov-aws force-pushed the ppotapov/assert_messages branch from 03a6d9d to 84cb93f Compare October 22, 2025 18:31
@ppotapov-aws ppotapov-aws merged commit 3a0f4eb into main Oct 22, 2025
6 checks passed
@ppotapov-aws ppotapov-aws deleted the ppotapov/assert_messages branch October 22, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants