Some of you may recall that David Beazley wrote a Python column for ;login: for many years. David explored facets of Python, from changes planned to key features of the language. In Python Distilled, David stays focused on the basics of Python—and only Python 3.6 or later.
When I first encountered Python, I knew I was looking at programming language that I could understand without ever seeing it before. It turns out that Python is not that simple, although if you use it simply you are really missing out. What makes Python interesting is really the topic of this book, those features of Python that make it distinct from any other programming language.
And that's really the key to David's book. While chapter one provides a brief overview of the language, the following chapters expand on the topics introducted in that chapter. And in doing so, David shows the reader just what is different about Python, and how to both write code clearly but also to take advantage of the ways Python is unlike other popular programming languages.
Under the hood, Python is based on objects. That provides a lot of the power of the language while also providing a uniform framework. For example, there are four types of list objects, each with distinct purposes, but all with the ability to iterate, to traverse lists producing each item in a for-loop. When opening a file, you should choose to do it with context, so when you leave that context the file is automatically closed.
David provides examples that make the most of the underlying features of Python 3. As this is a distillation, what you don't get is any in-depth information about non-core modules. For example, the re module, regular expressions, is covered in two paragraphs. The reader is directed instead to the online Python documents. While I wanted more, as I find re confusing, covering the plethora of modules this way makes sense in a book where the main goal is teaching the correct usage of the core of Python.
Python Distilled
David M. Beazley
Pearson 2022, 336 pages
ISBN 978-0-13-417327-6