3 ms·
why print then exit(1) instead of raising an exception?
by make3 1y ago
why print then exit(1) instead of raising an exception?
- mdaniel 1y agoOh, 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
- deleted 1y ago[deleted]