When errors are raised, the accompanying messages are output via print statements. This means that messages are printed at the top of the stack trace, where they're relatively hidden. Rather, error messages should be printed with the raise statement, as in raise SomeError('Some error message')
In my experience, this is especially confusing to less-experienced Python users, who aren't in the habit of scrolling through a stack trace, and so are unlikely to find these error messages.
When errors are raised, the accompanying messages are output via print statements. This means that messages are printed at the top of the stack trace, where they're relatively hidden. Rather, error messages should be printed with the raise statement, as in
raise SomeError('Some error message')
In my experience, this is especially confusing to less-experienced Python users, who aren't in the habit of scrolling through a stack trace, and so are unlikely to find these error messages.
The current approach:
The suggested approach: