Personal tools
You are here: Home User Group Association Program Book Reviews reviews_2005 Python in a Nutshell, First Edition
Document Actions

Python in a Nutshell, First Edition

by Tony Cappellini last modified 2006-11-05 02:16

reviewed by Eric Walstad, May 2005

 python_nutshell_sm.jpg
 
Python in a nutshell is an excellent reference for the experienced Python programmer. Alex Martelli does a wonderful job focusing on the book's goal of being a concise reference to important select portions of the Python language. His coverage of complex topics is a well balanced blend of written explanation and code examples. The book will be too advanced for newcomers to Python as well as beginning programmers, but for those looking to polish their Python skills this book is a real gem
 
Like the other Nutshell books from O'Reilly, Python in a Nutshell is valuable as a desk reference. It has an excellent index that makes finding topics easy. Experienced programmers will appreciate the lack of "fluff" as each topic is explained efficiently. Martelli goes into detail where it is needed most. For example the coverage of Python's exception mechanisms is quite thorough and includes an insightful section on error-checking strategies. However, the coverage of some topics may be considered too cursory. I will need to search for more on Python's struct module as the roughly 2 pages on module struct, without any examples, left me wondering just how and why I'd need this module. This was the exception, rather than the rule, though. Martelli doesn't try to cover too much in this book and topics deemed too remedial or too tangential are noted by references to further reading. This is why I consider Python in a Nutshell to be an excellent reference while designing and coding.
 
Alex Martelli's writing style reflects what must be a very deep knowledge of the Python language. I get the feeling he knows Python at the most basic level which is reflected in his concise explanation of topics. Code examples are used sparingly throughout the book, mostly when including them enhances or augments the topic's explanation. I found the book filled with Pythonic gems: knowledgeable reflections on why one idiom is better implemented one way than another way. I found the section on Optimization especially enlightening. It contains Python specific optimization techniques I've not seen in other Python books, like why there are big-O performance gains achieved by avoiding string concatenation in preference to list operations or using operator % for string formatting. In general I was left feeling like I had a glimpse of how Python programming *should* be done.

 
The preface of the book includes an explanation that the book is meant for those with prior Python experience and/or experience developing in other languages. There is little coverage of the Python basics, except for the first few chapters which will help bring the reader up to speed quickly. I found the lack of review of the basics a refreshing diversion from the remedial-first-section-with-huge-code-listings pattern found in so many other programming books. Alex Martelli is so good at explaining how and why Python works the way it does that profuse code examples would be a distraction anyway. However, I think I've been collecting Python 'how' and 'why' questions for years now and was ready to have those questions answered. A newcomer to the language might not be as primed as I was and therefore might not appreciate Alex Martelli's obvious Python Zen. I expect to keep Python in a nutshell close at hand during all stages of development with Python. Alex Martelli has created an excellent reference that doesn't try to do too much but does achieve the goal of covering the most important parts of Python. Like Python in general, Martelli's writing style is concise, clear and readable. His book includes an insider's explanations of how best to program with Python. This book is a valuable reference for experienced programmers ready to take their Python skills to the next level.
 
 
 
 
 
 
 
 
 
 
 

« November 2008 »
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
 

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: