Book Review: Python in a Nutshell
Tue 28 March 2023 Al Sweigart
Python in a Nutshell, 4th Edition by Alex Martelli, Anna Ravenscroft, Steve Holden, Paul McGuire. Published by O'Reilly February 2023. 735 pages.
5 stars. Python in a Nutshell is an excellent book for professional developers who have some experience with Python but want to take the leap to being a senior Python developer, Python in a Nutshell is required reading.
This is not a book for beginners new to programming, and I’d be hesitant to say that programmers experienced in other languages should use this book to learn Python (but if you’re the bold adventurous sort, have at it.) But if you want to fill out your Python knowledge and go beyond a developer who “kinda sorta” knows Python and copies and pastes Python code from Stack Overflow without much thought, this is a book you need to read.
In a way, the title is a bit misleading. “In a nutshell” gives you the idea that this book is small, but it’s actually over 700 pages long. Rather, this book is compact: it doesn’t waste time covering the basics and is quite dense with useful information.
The density of this book sometimes works against itself; there were quite a few times I had to carefully parse out the words and could have really used some example code to demonstrate the concepts. I understand why the authors skipped it: not everyone will need the additional explanation for every concept, and providing these examples would have doubled the page count. (For example, the object-oriented chapter led me to take quite a few breaks to test out what I had learned in the Python interactive shell just to make sure I understood what I read.) Suffice it to say, the information in the book is useful and accurate. It’s worth the time it sometimes takes to parse through the difficult concepts.
Other times though, it’s a breeze. There’s quite a wide range of topics covered in this book, and I feel like they do a good job going deep enough into each one without losing the big picture. And quite frankly: a lot of the information in this book just plain isn’t easy to find online. Without this book, you’d be chasing endless search result links to blog posts of varying quality, all while still missing out of several topics. The real value of Python in a Nutshell is that it gathers all of this knowledge into one well-written book.
Other books similar to Python in a Nutshell include Fluent Python by Luciano Ramahlo, Effective Python by Brett Slatkin, and Serious Python by Julien Danjou. I recommend reading all of these books though; while they have some overlap they complement rather than replace each other. If you’re experienced in a different language but want to learn Python, Python Distilled by David Beazley is a good book to read first for general Python information, and then followed up by Python in a Nutshell.
Even as a software engineer with years of experience in Python myself, I kept finding little nuggets of information that has filled in gaps of my Python knowledge that I didn’t know I had. Again, it’s not a book for total beginners but don’t let that scare you off. As long as you have the basics of programming concepts and are generally comfortable writing Python code, go ahead and get started with Python in a Nutshell.