REVIEW - Python in a Nutshell


Python in a Nutshell


Alex Martelli



O'Reilly (2003)




Daire Stockdale


February 2004



The cover blurb of this excellent book advertises it as 'A Desktop Quick Reference'. I would say that this book is much more then that: it is an informative and interesting treatise on Python, written by someone who clearly has extensive and thorough knowledge of the language. The writing style is extremely terse and factual, which can make the book very heavy reading at times, but I prefer this to the colloquial too often adopted by many computing books. I was very impressed by, and more then a little envious of, Alex Martelli's knowledge and understanding of Python.

The book aims to be a reference work on Python, and so starts at the beginning, explaining installation and theory, the language and syntax. For those already comfortable with Python, these sections might be slightly dull. The book covers 2.1 and 2.2, commenting differences between the versions, and even 2.3 where the specifications are known to the author. The book then deals with core subjects such as object-orientation, exceptions, modules etc, and manages to cover such broad subjects very well.

Then the author covers specific areas of Python usage and libraries, such as threads, testing and debugging, sockets, CGI scripting, HTML and XML parsing, embedding, extending and distributing Python applications. Lacking professional experience in many of these areas, I can only say that the author's treatment of them appears to be of the same high calibre as the rest of the book, and I doubt many who read this book will disagree. Code samples and their output are given where appropriate, each sample being neat and well structured, advancing the readers knowledge. Occasionally the author highlights 'gotchas' particular to Python, or advises a particular coding practise, and these are so sensible and insightful that I was reminded again and again of Stroustrup's 'The C++ Programming Language'.

I whole-heartedly recommend this book to all Python programmers. It is a very concise and informative book, and its small size belies its information content. I would also recommend and suggest this book to any experienced programmers wishing to begin programming in Python, who would enjoy a straight-to-the-point manual on the Python language.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.