Module 7 Summary
Thomas J. Kennedy
Having completed the File IO, Context Managers, and Exceptions module (i.e., Module 7) you should now be comfortable:
-
Using context managers to guarantee that all files are closed.
-
Working with plaintext input files
-
Working with plaintext output files
-
Handling exceptions
1 Questions to Consider
Take a few minutes to think about the following:
-
How context managers increase readability of code the reads from (or writes to files)
-
When a
ValueError
can be raised -
When a
IndexError
can be raised
2 On to the Next Module…
The next module (i.e., Writing Pythonic Code, Code Linting, and Testing with PyTest) will discuss how to test Python code along with discussions of linting tools.