Derived from the Pyflakes linter.
What it does#
except blocks that handle all exceptions, but are not the last
except block in a
Why is this bad?#
When an exception is raised within a
try block, the
except blocks are
evaluated in order, and the first matching block is executed. If an
block handles all exceptions, but isn't the last block, Python will raise a
SyntaxError, as the following blocks would never be executed.