Programming Python, 4th Edition Review
I have had the pleasure of reading author Mark Lutz's work for nearly 15 years, starting with his first edition of Programming Python way back in 1996. Since then, Python has grown from a Perl alternative to a language capable of running some of the most sophisticated and flexible applications for global companies like Google. How does this 4th release hold up to the previous books it was built upon? Read on to find out.This latest edition begins with a quick summary of what it has been built upon as well as the bold assertion that it only focuses on Python 3 (specifically 3.1, though the code examples work with the latest 3.2 release as well), leaving the Python 1.x and 2.x legacies behind. For those developers not yet ready to make a break for the 3.x world, stick with the 3rd edition.
The book is divided into six parts, starting with the aptly named Part 1. The Beginning. It's also the shortest part of the book, just over 65 pages long, giving a grand overview of the book's contents. Part 2, System Programming, explores system tools (the os and sys modules), script execution context, file tools and threads. The third part focuses a large portion of the book on GUI programming via the Tk/tkinter framework. Part 4 covers Internet programming from the socket level and various libraries (FTP, Email, HTTP and NNTP) to server-side scripting via raw CGI as opposed to spending much time with purpose-built web frameworks like Turbogears and Django. Part 5 delves into tools and techniques, covering databases via pickled objects, ZODB OODB, SQL and ORMs as well as data structures (sets, search trees, sorting, etc.), text and language via string methods, regular expressions and HTML/XML parsing. A chapter covering the Python/C and C++ connection via the SWIG integration code generator also includes a section on embedding python in C and the issues that need to be considered when doing so. The book concludes with its sixth and final section called, appropriately enough, The End. And for those who have spent the time reading the preceding 1,500 pages of the book, Mark shares the meaning of life (keeping in character of paying homage to Python's fixation with all things Monty Python). I also appreciated his brief statement that "something's wrong with the way we program computers," and the wonderful "Gilligan Factor". Indeed, reading the book's final chapter was a nice reward coupled with some especially insightful commentaries on the current state of application development in general.
Even with the emphasis on Python 3, the book continues to clock in at over 1,600 information-packed pages, leaving no standard Python library or related technology unturned. Considering that the previous edition was roughly the same page count, the exclusion of older, deprecated Python explorations is significant. Also making its appearance for the first time in the book is the recognition of Django and Jython; however, Mark smartly abdicates any deep discussion of these technologies to other books. They merely make a limited appearance as a way to recognize their contributions to the Python ecosystem.
For those interested in having a solid foundation Python and are untethered by the past, this edition is a must-have title on your technical bookshelf. For those experienced Pythonistas who own previous editions and are ready to either move their legacy code forward into the new Python 3 practices, Mark shows the way. Given the significant differences between the 3.x and older versions of Python, there remain enough similarities that a large majority of Mark's code has made the jump to this latest edition. And while he continues to rely on Tk for his Python GUI foundation of choice (a good one considering that many others have yet to fully support Python 3.x), the examples are timeless and do the job of advertising the powerful punch that Python provides even after all these years.
Title: Programming Python, 4th Edition Author: Mark Lutz Publisher: O'Reilly Media ISBN: 978-1-4493-0183-5 Pages: 1,632 Price: $51.99 (Ebook), $64.99 (Print)