Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

duplicate_except.py 290B

123456789101112
  1. """Test for duplicate-check."""
  2. def main():
  3. """The second ValueError should be flagged."""
  4. try:
  5. raise ValueError('test')
  6. except ValueError:
  7. return 1
  8. except ValueError: # [duplicate-except]
  9. return 2
  10. except (OSError, TypeError):
  11. return 3