Dive into Python 3 by Mark Pilgrim
Python has been on my radar since early 2003. Back at that years ACCU conference, Guido van Rossum gave a keynote on the evolution of Python and the philosophy that shaped the language. I liked what I heard and actually made an effort to learn Python some years ago through Mark Lutz book Learning Python. My goal at that time was to use Python in my everyday scripting automating repetitive tasks. Somehow I ended up using different Lisp dialects instead. Clojure, Common Lisp, even newLISP at times. Lisp worked beautifully, but it was only part of the reason I never made the transition to Python. In retrospect, I think it had more to do with motivation. As I reviewed Learning Python, I remarked that it was "too basic and slow paced". I simply lost interest as I read along. At the end, Learning Python made me wish for another approach that started "by a small, yet real-world example, and walk us through the program design step by step". Little did I know that Dive into Python takes exactly that approach.
Let me start with Python the language. In the last year I've programmed extensively in Python and the language has grown tremendously to become my second favorite, surpassed by Lisp only. What attracts me to Python is the uniformity and consistency of its design. It's simple, straightforward and elegant. Yet Python allows me to build abstractions of increasing power as my skills get deeper. I rarely felt that Python limited the expressiveness of a certain solution. One of the larger projects I've done in Python was a framework for deployment and automated testing at system level. The meta-programming facilities of Python served well in developing a domain-specific language for the problem domain. If I lacked anything compared to my Lisp adventures it was the macro system of Lisp. Lisp macros are a killer feature, but I have to admit that the accessibility and relative popularity of Python makes it a much easier sell. Python is an expressive high-level language that's fun to program in, even for a Lisp programmer, without too much pain. It's an acceptable trade-off.
As I finally got along to do some serious programming in Python I bought Dive into Python in order to get up to speed quickly. Dive into Python takes a top-down approach teaching by example. It's practically oriented. Mark Pilgrim often introduces a new topic by presenting the complete program to the reader. The rest of the chapter dissects the code concept by concept. In other chapters, most notably the one on unit testing, a more iterative approach is taken where Mark lets the reader join as he develops and refactors his code. From a pedagogical view, both styles work fine. Further, the included code is a carefully chosen bland of real-life programs. This sets it apart from a majority of programming books.
The text is complete in the sense that it works as a whole; the chapters build on each other and earlier chapters serve as a foundation for more advanced concepts. When a new technique is introduced it's clearly mentioned and related to previous knowledge. The result is a true joy to read since it encompasses qualities rarely seen in other technical books. Hats off to Mark Pilgrim for his excellent work!
Reviewed March 2012