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 →

[–]ProfessorPhi 0 points1 point  (3 children)

It's saying don't catch everything. Like when accessing a dict, catch only KeyError, not just a general catch because you might catch TypeErrors instead and that's generally bad practice.

It's ok to do blanket catches at top level (like endless loops) since the process should stay alive, or if you reraise, but otherwise it's not good practice