Homework Session06 ================== .. rst-class:: left Finish up the exercises Write a complete set of unit tests for your mailroom program. * You will likely find that it is really hard to test without refactoring. * This is Good! * If code is hard to test -- it probably should be refactored. Material to review for next week -------------------------------- Next week, we'll get started on Object Oriented Methods. It's a good idea to read up on it first -- so we can dive right in: * Dive into Python3: 7.2 -- 7.3 http://www.diveintopython3.net/iterators.html#defining-classes * Think Python: 15 -- 18 http://www.greenteapress.com/thinkpython/html/thinkpython016.html * LPTHW: 40 -- 44 http://learnpythonthehardway.org/book/ex40.html [note that in py3 you don't need to inherit from object] Talk by Raymond Hettinger: Video of talk: https://youtu.be/HTLu2DFOdTg Slides: https://speakerdeck.com/pyconslides/pythons-class-development-toolkit-by-raymond-hettinger