Skip to content

Commit a44ad73

Browse files
authored
Correct a typo in README
1 parent c2c28b3 commit a44ad73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A flake8 extension that checks for blind, catch-all ``except:`` and ``except Exc
55

66
As of `pycodestyle 2.1.0 <https://github.com/PyCQA/pycodestyle/commit/543f12b06592c53e2e60edc4846ee02ab9550e8b/>`_, "E722 do not use bare except, specify exception instead" is built-in. However, bare ``Exception`` and ``BaseException`` are still allowed. This extension flags them as `B902`.
77

8-
Using ``except`` without explicitly specifying which exceptions to catch is generally considered bad practice, since it catches system signals like ``SIGINT``. You probably want to handle system interrupts differently than exceptions occuring in your code.
8+
Using ``except`` without explicitly specifying which exceptions to catch is generally considered bad practice, since it catches system signals like ``SIGINT``. You probably want to handle system interrupts differently than exceptions occurring in your code.
99

1010
It's also usually better style to have many small ``try``-``except`` blocks catching specific exceptions instead of a giant ``try:`` block with a catch-all ``except:`` at the bottom. It's also nicer to your fellow programmers to be a bit more specific about what exceptions they can expect in specific parts of the code, and what the proper course of action is when they occur.
1111

0 commit comments

Comments
 (0)