Except clauses with commas #6

erikrose opened this Issue Mar 26, 2013 · 0 comments


None yet
1 participant

It's easy to mess up except clauses in Python 2:

except ValueError, TypeError:

…actually catches just ValueErrors and puts them into a variable called "TypeError". Bad news. It should be…

except (ValueError, TypeError):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment