3 ms·
Love the boldness here of trying to make something you dislike a syntax error. I don't really get preferring `except BaseException` over `except`. I'd love to
by benrutter 2y ago
Love the boldness here of trying to make something you dislike a syntax error.
I don't really get preferring `except BaseException` over `except`. I'd love to get more info on possible exceptions though and I think it would cut down a lot of the catch all handling I see.
As far as I know, python doesn't give you any way of asking "what exceptions can this function run" - aside from just inspecting every line of code. I'd massively love to have those kind of details available.
- Numerlor 2y agoI have suggested adding an option for exceptions into typing as a non exhaustive list of what something can raise so you actually know what you should or shouldn't be handling. But as it usually goes in the forums the discussion just devolved into misunderstanding it as checked exceptions and how code that'd benefit from it is bad because exceptions you don't know about should bubble up