Re:I'm Switching to Python and Actually Liking It
by make3 on Wednesday July 16, 2025 @06:34PM
(#44587566)
why print then exit(1) instead of raising an exception?
[ Parent
| on HN ]
Re:I'm Switching to Python and Actually Liking It
by mdaniel on Wednesday July 16, 2025 @11:17PM
(#44589354)
Oh, I know this one:
$ python3 -c "print('clear messaging'); exit(1)"
clear messaging
$ python3 -c "raise ValueError('text that matters')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: text that matters
and that story gets _a lot_ worse when some programs raise from within a "helper" module and you end up with 8 lines of Python junk to the one line of actual signal