If you follow Python blogs youâll have seen more than one review of Tarek ZiadĂ©âs book, Expert Python Programming. As a result of these reviews Iâd decided that, although the book looked interesting, I wouldnât be investing in a copy for myself; but when the publishers contacted me directly with the offer of a free review copy, I accepted.
You may wonder: Why the need for a book on expert Python programming? Doesnât Python value simplicity and transparency above all else? (Language lawyers and golfers, look elsewhere!) Why any book on Python, when the online documentation is so well put together?
Yes, thatâs what I thought too, but the fact is, Python has steadily expanded over a series of point releases. The standard tutorial omits important new(-ish) features such as decorators and properties, and its treatment of generators and special methods is light. Although the language reference covers these topics, itâs no user guide.
Expert Python Programming starts well, picking up where the Python tutorial leaves off. It soon becomes evident Tarek Ziadé is indeed an expert Python programmer. He walks through some nice real-world examples. He presents guidelines and advanced idioms few Pythonistas would dispute. He points to tools, modules and articles hosted on and away from python.org with accuracy.
Unfortunately the details let the book down. Graphics are poor quality. Some screen shots are barely readable. Hereâs a broken code sample â itâs not the only one.
(While Iâm nit-picking, I wish books didnât resort to comments for call-out text, and Iâd prefer an example which doesnât shadow a built-in function).
Iâm less bothered by the grammatical errors and typos. Tarek ZiadĂ© writes clearly and engagingly. The book is easy to read. That said, I wonât let him get away with this pronouncement on Test-Driven Development (TDD).
   [TDD] is widely used in the Python community, and probably more so in communities that work with statically typed languages. This may be due to the fact that developers think that most tests are done by the compiler, which checks many things when it produces a binary.
Further in, the book covers more general software engineering discipline, with chapters on packaging and distribution, version control, project tracking, documentation, optimisation etc. As ever, Tarek ZiadĂ© provides some welcome pointers to Python best practices, but I see little point in (e.g.) supplying sample Trac configuration file listings â it would be better to direct readers to up to date online documentation.
Once you get beyond the core language, Python becomes a sizable topic. It must have been hard to decide what belongs in a book for expert Python programmers, and what to leave out. I do think there should have been more about Python 3.0. I would also suggest coverage of embedding and extending â of interfacing with other languages.
In summary, then, I enjoyed Expert Python Programming and learned a few things from it. I donât think Iâll return to it often, but it has provided some useful pointers. With careful editing and design it could have been much better.