Epilogue
Well, that’s the whole book. We came a long way, from writing the crow’s nest program in chapter 2 to chapter 22’s interactive Tic-Tac-Toe game, incorporating a custom class based on named tuples and using type hints. I hope you can see now how much you can do with Python’s strings, lists, tuples, dictionaries, sets, and functions. I especially hope I’ve convinced you that, above all, you should always write programs that are
-
Flexible, by taking command-line arguments
-
Documented, by using something like
argparseto parse your arguments and produce usage statements -
Tested, by writing both unit tests for your functions and integration tests for your program as a whole
The people using your programs will really appreciate knowing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access