• Donate
  • Log In
Home
  • About
    • About
      • About Us
      • Our Board of Directors
      • Board Meeting Minutes
      • Board Elections
      • Updates & Announcements
      • Our Staff
      • Governance & Financials
      • Lifetime Achievement Award
  • Events
    • Events
      • Upcoming
      • Past
      • Conference FAQ
      • Conference Policies
      • Code of Conduct
      • Calls for Papers
      • Author Resources
      • Grant Opportunities
      • Best Papers
      • Test of Time Awards
  • Join & Support
    • Join & Support
      • Become a Member
      • Ways to Give
      • Our Supporters
      • Student Opportunities
      • Sponsorship Opportunities
  • Archive
    • Archive
      • Proceedings
      • Multimedia
      • ;login: Archive
      • Short Topics in System Administration Series
      • Journal of Education in System Administration (JESA)
      • Journal of Election Technology and Systems (JETS)
      • Computing Systems Journal
  • Search
Join the conversation
Back to ;login: Online

Python Distilled

October 19, 2022
Bookreview
Authors: 
Rik Farrow
Article shepherded by: 
Rik Farrow

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.

The book's back cover suggests that this book is appropriate for developers at all levels, and I'd agree with a couple of caveats. If you are already familiar with Python, but want to improve your coding and facility with the language, this book is for you. If you are new to Python, David provides a terse guide, but one that should work for those who have already mastered other programming languages. If you are new to coding in general, I suggest you start elsewhere, as there are loads of concepts that will be unfamiliar but their existence is just assumed. As an example, objects are the basis of Python, and there is a complete chapter on objects: chapter seven, one of the longest chapters. But the reader has been exposed to objects since chapter one, the assumption is that the reader knows what an object-oriented language is and what is special about it.

That said, I can recommend this book. I found it helpful, as I wanted to review and renew what I knew about Python. These days, many programmers spend their time searching on-line for snippets of code that will do, more or less, what they need. But that doesn't teach one about how best to to use Python, understand its subtleties, and write readable code. David's book can do this for you.

Python Distilled

David M. Beazley

Pearson 2022, 336 pages

 ISBN 978-0-13-417327-6

Article Categories: 
SRE
Programming
Sysadmin
Last updated February 8, 2023
Authors: 

Rik Farrow has been a consultant for 42 years. He has written two books, as well as worked as the technical editor for a UNIX magazine and for two editions of a popular operating system book. He also taught UNIX system administration and Internet security during the 90's internationally, and worked as a volunteer for USENIX program and steering committees. Rik has been the editor of ;login: since 2005.

[email protected]
  • Log in to post comments
USENIX logo
  • Contact USENIX
  • Privacy Policy

© USENIX 2025
EIN 13-3055038

Website designed and built by Giant Rabbit LLC
Powered by Backdrop CMS

We need contributions from individuals like you.

USENIX conferences directly influence the development of computing systems and products used worldwide. Contribute today to support this vital work for the next 50 years.

Secure the Future of USENIX

Donate
Close