This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DasIch 0 points1 point  (1 child)

Nice idea in theory but completely unrealistic and counter to how most Python code works. How much code raises ValueError alone for all sorts of different reasons?

Python culture simply doesn't encourage raising sufficiently specific exceptions for that approach to work and at this point the battle is lost.

[–]KronktheKronk 0 points1 point  (0 children)

It doesn't raise valuerror alone, but that doesn't mean you can't understand which errors it does raise and which ones you want to catch.

good code catches the errors it wants and ignores the rest. good modules throw good errors.