Menu

#21 Use modern exception syntax

Unstable_(example)
accepted
None
1
2020-02-24
2020-02-24
No

Python 2 started out with the raise Type, Value, Traceback syntax. Python 3 instead requires raise Type(Value). Likewise, Python 2 started out with except Type, var to catch exceptions, while Python 3 requires except Type as var. Use the Python 3 formats, both of which are also supported in more recent Python 2.

1 Attachments

Discussion

  • Christopher Head

    This patch probably depends on 18 and 19. Import those first.

     
  • Jérome Laheurte

    • status: open --> accepted
    • assigned_to: Jérome Laheurte
     

Log in to post a comment.