Add heaps of stuff from chapters 6 and 7

Also a note: the examples and complete book text are on github:

https://github.com/diveintomark/diveintopython3