Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
robot_no_419
4y ago
0 comments
Save
Share
Unless I'm misunderstanding, they are wrapping their asserts in try/catch blocks? That's... yikes.
0 comments
3 comments · 1 top-level
top
newest
oldest
masklinn
4y ago
· 2 in thread
Most likely they just `assert` error conditions and let that blow up as error reporting, rather than write a full conditional and raise a custom exception.
I’ve been guilty of that in my own code when I just want to tell myself about an error.
andi999
4y ago
Isnt just assert the error condition how assert is actually intended to be used?
masklinn
4y ago
Depends. The issue is that since `assert` is stripped out in “O” mode, if the codebase depends on `assert` for correctness… they’re not compatible.
1 more reply
j
/
k
navigate · click thread line to collapse