Posts

ITFdn100 A - Autumn 2017 - On exception handling, and pickling, in Python

Image
Hi folks, This post is for Assignment07 in IntroToProg-Python, with Instructor Randal Root. So, I'd had some previous (minimal) experience with Python try/except blocks . For this course, though, per the instructions for this assignment, I went on the Internet to find some examples of Python exception handling. First, I searched "Python 3 try except" on DuckDuckGo (DDG). I found several results from python dot org, but chose to look closer at a result from stack overflow - Python exceptions . User question: Different user's answer: And a new, different user's reply to the answer above: It's in the third screenshot above (just above this), that I found something that will stick with me on Python exception handling: be as precise as is feasible in order to catch only the exceptions that matter for the program/module in question. And here's some code that I wrote (and partially reused from Randal's video #5 from module07), to sh