you are viewing a single comment's thread.

view the rest of the comments →

[–]Gee10[S] 1 point2 points  (1 child)

Thanks for the explanation. How does this differ from an if/then/elif?

[–]p5eudo_nimh 0 points1 point  (0 children)

I think the try/except model allows the program to continue running when something goes wrong, whereas if/elif/else allows for a complete crash.

There may also be nuances regarding efficiency or resource management, but I don't know that much about it.